===================================== -l: Listen mode, for inbound connects ===================================== To create a TCP server, you can use the `-l `_ option to listen for incoming connections: .. tab:: Unix .. code-block:: sh pync -l localhost 8000 .. tab:: Windows .. code-block:: sh py -m pync -l localhost 8000 .. tab:: Python .. code-block:: python import pync pync.run('-l localhost 8000') If instead you want a UDP server, combine the `-l `_ and `-u `_ options: .. tab:: Unix .. code-block:: sh pync -lu localhost 8000 .. tab:: Windows .. code-block:: sh py -m pync -lu localhost 8000 .. tab:: Python .. code-block:: python import pync pync.run('-lu localhost 8000') .. raw:: html

:SEE ALSO: * :doc:`keep-server-open` * :doc:`udp`