i'm having problems connecting to a remote daytime-udp server.

consider the code extract (error checking left out):
s = socket(PF_INET,SOCK_DGRAM,0);

x = sizeof adr;

z = sendto(s,NULL,0,0,(struct sockaddr *)&adr_srvr, len_inet);

z = recvfrom(s,dgram, sizeof dgram,0,(struct sockaddr *)&adr, &x);

dgram[z] = 0;
now i can connect to remote windows based daytime-upd server ok, but have problems with a linux one.

if i reload the service using chkconfig (off then on) it works the first time but not sebsequent times.
are there known differences between the servers? am i sending the right dummy udp request to the server?

TIA, rotis23