-l: Listen mode, for inbound connects#
To create a TCP server, you can use the -l option to listen for incoming connections:
pync -l localhost 8000
py -m pync -l localhost 8000
import pync
pync.run('-l localhost 8000')
If instead you want a UDP server, combine the -l and -u options:
pync -lu localhost 8000
py -m pync -lu localhost 8000
import pync
pync.run('-lu localhost 8000')
- SEE ALSO: