Skip to main content

Tcp_chat

PyPI version
A simple tcp chat on python

Installing

Using pip:

$ pip3 install cn-tcp-server

Using git:

$ git clone https://github.com/cl1ckname/tcp_chat.git
$ mv tcp_chat <path_to_your_python_packeges_folder>/tcp_chat

Usage

The chat works on a room system. Any names consisting of symbols of the Latin alphabet, numbers and slashes are acceptable. Chats are not password protected, so anyone can join any room, or create their own.
How it look like:

Clickname - Hay, is this chat empty?
BigJoe2008 - No, the guys and I are here discussing isomorphism problems in topologically compact manifolds
Clickname - Oh...

Commands

To start the server write:

python3 -m tcp_chat server -a <IP> -p <PORT>
  • IP - Your IP address where the server will run. The default is localhost.
  • PORT - The port that the server will listen on. The default is 8888.

To start client write:

python3 -m tcp_chat start client -a <IP> -p <PORT> -u <USERNAME> -c <CHAT_ID>
  • IP - Your IP address of server. The default is localhost.
  • PORT - The port of that server. The default is 8888.
  • USERNAME - The name with which your chat messages will be shown.
  • CHAT_ID - The name of the chat room. If such exists, the application will add you to it, if not, it will create.

Close application

To close server tap CTR+C
To stop client tap CTR+C or write /exit

For custom clients

You can use any tcp client to connect, you should only follow the authentication system:

  • The first message must match the pattern <USERNAME>_<CHAT_ID>
  • There are three response codes
    • 200 - Authentication passed
    • 400 - Invalid first message
    • 403 - User with this username already connected

Messages are sent as plain text in UTF-8 encoding.

Metadata

Release files for cn-tcp-server 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cn-tcp-server 0.0.2
File Size Uploaded Provenance Actions
cn_tcp_server-0.0.2.tar.gz 5.6 kB Without provenance Details for cn_tcp_server-0.0.2.tar.gz

Release files / cn_tcp_server-0.0.2.tar.gz

Download URL cn_tcp_server-0.0.2.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
120e780a5c964069f26386b64406034dbca3bb28868b41787197b9975582bcb9
BLAKE2b-256 checksum
How to use checksums
201ba007856fd7a39aef333f0e2183563727a153b4c020efe2f2c33415ed8146
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.8.10

Security for cn-tcp-server 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.2 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page