-u: UDP mode#
By default, pync uses TCP (Transmission Control Protocol) for transport.
Using the -u option, you can set the transport to UDP (User Datagram Protocol) instead.
A Client/Server Example#
Create a test UDP server:
pync -lu localhost 8000
py -m pync -lu localhost 8000
# server.py
import pync
pync.run('-lu localhost 8000')
On a separate console, connect to the server:
pync -u localhost 8000
py -m pync -u localhost 8000
# client.py
import pync
pync.run('-u localhost 8000')
- SEE ALSO: