ssize_t socket_recv4(int s, char* buf, size_t len,
char ip,uint16* port);
socket_recv4 receives up to len bytes starting at buf from a UDP datagram coming in on the socket s. It writes the UDP port to port and the IP address to ip, and returns the number of bytes actually received (or -1 if anything went wrong).
socket_recv4 returns the number of bytes in the datagram if one was received. If not, it returns -1 and sets errno appropriately.
s = socket_tcp4();
len = socket_recv4(s,buf,sizeof(buf),ip,&p);