Forum Discussion
Altera_Forum
Honored Contributor
20 years agoUDP Header isn't sent
hi all, I'm having problems with sending out my udp-header. When I use ethereal it claims that no header was sent out. I am using the LWIP stand alone webserver example to send out my udp m...
Altera_Forum
Honored Contributor
20 years agoDanny,
I don't think you can bind and connect with the same udp pcb, at the same time. Since you're not really doing anything with it anyway, I would remove the following line of code: udp_bind(udpSocket, IP_ADDR_ANY, localPort); //Bind socket to port Also, please keep in mind that UDP is "connectionless". Each _send or _recv is a separate transaction. The sockets paradigm hides this from you, but LWIP's raw API requires that you understand this fact and write appropriate code. I posted a sample of how to do this, for a simple echo server. Also, it still disturbs me that you aren't just simply modifying the existing standalone LWIP example. IMHO, you'd make much faster progress going this route. Best of luck, - slacker