When I have a simple server-client code, how do I get the client to send the server a time request and the server responds, and the client then displays the offset and the delay ? The communication should be in NTP. I think that means there are 4 time stamps, and 2 stay on the server and the other 2 will be send to the client. The calculations don't matter right now, I am just curious how I would send and receive those requests.
Jump to Post
If you've already established the connection, you can just use the existing socket to send messages between the two machines. What that means, specifically, depends on the client/server setup.
If you have a command-oriented set where one machine issues commands to the other (or there is some other well know …
Jump to Post
I was addressing your final comment:
The calculations don't matter right now, I am just curious how I would send and receive those requests.
If what you want is how to get fine-grain time resolution on your machine - that is platform (and sometimes hardware) specific.
There are …
All 7 Replies
We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.