What I need to do:
Send a packet to pool.ntp.org (and I am assuming I get a packet back automatically).
The following just does not work for me. I have no solid idea of what I am doing, so for now I would be satisfied if I could reach the address and get the packet back. The code below just hangs. Any and all help would be appreciated.
sock = UDPSocket.new
The documentation on UDPSocket states:
connect(host, port) Connects udpsocket to host:port. This makes possible to send without destination address.
That means that you may use
send(mesg, flags) form of the
send, nothing more. You need to send a request message to the NTP server to get a reply
You can see the NTPv4 protocol specification here: RFC 5905