Anyone have any ideas?
I'm trying to query an NTP server with the following (see page http://www.kloth.net/software/timesrv1.php for example code)
The code gets as far as the SOCK_TCPCONNECT and locks up. Is there a problem doing a socket connection to a server you didn't start?
I'm trying to query an NTP server with the following (see page http://www.kloth.net/software/timesrv1.php for example code)
Code (glbasic) Select
LOCAL server$, ok%, sock%, rv%
ok%=SOCK_INIT()
sock% = SOCK_TCPCONNECT("0.pool.ntp.org", 37)
rv = SOCK_TCPSEND (sock, "\n")
LOCAL Done = 0
WHILE Done = 0
rv = SOCK_RECV(sock%, msg$, 1024)
IF rv = -2
SLEEP 1
ENDIF
IF KEY(1) = 1
Done = 1
ENDIF
WEND
The code gets as far as the SOCK_TCPCONNECT and locks up. Is there a problem doing a socket connection to a server you didn't start?