>You'll have to add a call to bind(). Something like:
>
>if (bind(sockfd, (struct sockaddr*)&addr, sizeof(struct sockaddr)) == -1)
>{
> perror ("bind");
> return (-1);
>}
>
>When you don't call bind(), the socket remains "unnamed" (in BSD-lingo).
>Hence, in lwIP lingo, the socket has "no recv function registered". Makes
>sense?
>
>BTW. It's smarter to clear 'addr' before settting up the rest of it:
> memset (&addr, 0, sizeof(addr));
I did that, I just left out the error handling etc to keep the mail short.
I also tried bind without success. However I have found my error.
Before using sockets I tried raw udp_* functions. This code was
still in so my port was already taken. Without it I can now use
the socket functions.
Thanks
bye Fabi
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users