Udp.beginPacket() time delay problem

SurferTim:

A UDP 'connect' should merely set a default destination address and should not initiate any network traffic.

How do the NTP packets get to and from the NTP server with no network traffic? They are UDP. Or am I reading that wrong?

UDP is a datagram protocol and TCP is a stream protocol.

With a stream protocol, a connection is established between a client and server by exchanging packets over the network and then content is written over the stream by exchanging additional packets. Hence there are distinct 'connect' and 'send' phases which both involve network traffic.

With a datagram protocol, no connection is established. Hence the 'connect' phase does not involve sending or receiving network traffic, it just updates the internal state of the client to indicate where subsequent datagrams will be sent to. Nothing is sent over the network until you actually send data. Since Udp.beginPacket() function does not have any arguments providing data to be sent, I would not expect that to cause any network activity.