Skip to content

Asynchronous TCP echo-server built on top of the python asyncio

License

Notifications You must be signed in to change notification settings

opennikish/py-tcp-echo-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Asynchronous TCP echo-server

Asynchronous TCP echo-server built on top of the python asyncio. Does not have any dependencies.

Note: You can use ncat -e /bin/cat -k -l 8888 but if it's not available for you by some reason, or you want to add some more functionality (by modifying this source code) you can use this one.

Usage

Download:

curl -O https://raw.githubusercontent.com/opennikish/py-tcp-echo-server/main/echo-server.py

Run:

python echo-server.py --port 8888

Options:

required arguments:
  --port PORT        port to bind to
  
optional arguments:
  -h, --help         show this help message and exit
  --host HOST        host to bind to (default: None)
  --backlog BACKLOG  backlog for server socket (default: 100)
  --buffer BUFFER    read buffer size (default: 8192)
  --silent           do not log anything during handling connections (default: False)

Send something:

nc -v localhost 8888
hello
hello

Releases

No releases published

Packages

No packages published

Languages