Hello everybody,

I'm in need to program a datagram-based application for the very first time in my life, and since I haven't found very good documentation how to perform this on lwIP stack, I've decided to seek advice once again from more experienced programmers; I've already had good experiences in seeking answers from here :)

Anyway, as I understand, usually initializing UDP socket is done somehow like this:

  serversocket = socket( AF_INET, SOCK_DGRAM, IPPROTO_UDP );
  server.sin_family = AF_INET;
  server.sin_port = htons( server_port );
  inet_aton( server_ip, & server.sin_addr );
.
.  // some other code here, and then calling eventually
wri_length = sendto( serversocket, server_msg, strlen ( server_msg ), 0, (struct sockaddr *) & server, sizeof ( server) );

But obviously it's not meant to be used like this in lwIP. The sendto( )-function described above hangs completely, and normal send doesn't either seem to do very well, because the peer server doesn't receive anything. Is this proper way or have I got it all
wrong? Or am I supposed to call functions defined in udp.c directly?

Best regards,
  M. Repo, Helsinki, Finland



_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to