通过 UDP 使用
通过 UDP 使用时,时间服务的工作方式如下:
S: Listen on port 37 (45 octal).
U: Send an empty datagram to port 37.
S: Receive the empty datagram.
S: Send a datagram containing the time as a 32 bit binary number.
U: Receive the time datagram.
服务器在端口 37 上监听数据报。数据报到达时,服务器返回一个包含 32 位时间值的数据报。如果服务器无法确定其站点的时间,则应丢弃到达的数据报且不作回复。