This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

UDP发送问题

我采用dsp的StarterWare开发UDP例子,实现在接收数据时反馈给发送端,代码如下:

void recv(void *arg, struct udp_pcb *pcb, struct pbuf *p,struct ip_addr *addr, u16_t port)
{
char msg0[10]="received";
struct pbuf send;
send.payload=msg0;
send.len=8;
send.tot_len=8;
send.next=NULL;
int flag=udp_sendto(udp_pcbs,&send,addr,port);;
}

调试时,我用上位机发送udp可以进入接收程序,但是上位机没有收到dsp发的数据,不知道代码哪部分出问题?(返回值flag为0)