Skip to main content

A simple TCP client and server for easy testing

Project description


Simple tools to manually test socket programming project. Requires python3.


  • Arguments can be inputted via command line arguments vs via interactive console
  • Verbose mode vs silent mode
  • SSL/TLS wrapped socket (optional)
  • Does not require additional python module (only using socket, argparse, ssl, and sys)

Common Usage:

  • python3 -s -p 3000: start server socket on port 3000 and accept connection from all interface
  • python3 -c -h -p 3000: connect to
  • python3 -i: interactive mode, the script will ask for host, port and mode interactively (easier for noobs)


  • "-h"/"--help": display all command line arguments
  • "-a"/"--host": (optional) set target host, ex: -a, will default to localhost if not set
  • "-p"/"--port": (optional) set target port, ex: -p 8888, will default to 80 if not set
  • "-b"/"--buffer": (optional) set buffer size, ex: -b 1024, will default to 4092 if not set
  • flag mode: "-s"/"--server" or "-c"/"--client", can only choose one, will default to client mode if not set
  • flag interactive: "-i"/"--interactive", ask for host, port, buffer, and mode interactively (automatically assumed if no arguments provided)
  • flag verbose: "--verbose", display verbose output (useful for debugging)

SSL Arguments:

  • flag ssl: "--ssl": add this flag to use ssl mode
  • "--ssl_server_certificate": set path to ssl server certificate (for ssl server mode only)
  • "--ssl_server_privatekey": set path to ssl server private key (for ssl server mode only)
  • "--ssl_client_ca": set path to certificate authority (CA)'s certificate (for ssl client mode only)

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for simple-tcp, version 0.6
Filename, size File type Python version Upload date Hashes
Filename, size simple_tcp-0.6-py3-none-any.whl (5.1 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page