Skip to main content

High level server and client development with E2E encryption.

Reason this release was yanked:

Error -> _server__asyncServer not define

Project description

Intro

A Python package for creating E2E ( Server to Client )encrypted TCP server-client programe, It also allows users to create a TCP chat application with E2E ( Client to Client ) encryption.

What are the features it provides

The main feature it provides is the multi client server. The server can handle 1000s of concerrent connections and send and receive data from them. In addition to this is make the connection E2E encrypted. Morever it also provide the functionality to chat with other clients ( Client to Client ) with E2E encryption.


Sample Server

Before creating server make sure you have a .yaml file as it is required

server.py

#imports
from PySocket import server

# sample function 
def abc(data):
    print(f"data : {data}")

# initializing asyncServer class
s = server(secure = True, file = r'server.yaml')

# creating server
s.SERVER(
    address = "localhost",
    port = 8080,
    listeners = 10
)

# creating channel for sending and receiving data
s.CREATE_CHANNEL("simple")

while True:
    # listening to upcoming data
    s.LISTEN(
        channel = "simple",
        function = abc,
    )

Sample Client

Before creating server make sure you have a .yaml file as it is required

#imports
from PySocket import client

#sample function
def abc(data):
    print(data)

# initializing asyncClient class
c = client("shikhar",DSP_enable=True,file = r'secure.yaml', debug=True)

#creating client
c.CLIENT("localhost",8080)

# creating channel for sending and receiving data
c.CREATE_CHANNEL(["simple","qwerty"],multiple=True)

# sending data to server
c.SEND(
    channel= "simple",
    data = "Hello, World! - from shikhar"
)

Thank you!


Project details


Download files

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

Source Distribution

PySock-0.0.1.tar.gz (16.2 kB view hashes)

Uploaded Source

Built Distribution

PySock-0.0.1-py3-none-any.whl (16.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page