Skip to main content

Easy to use implementation of the built in 'socket' library

Project description

SuperSockets

Easy to use implementation of python3's built in 'socket' library



Example Use

Server Configuration

#Create connection
server = connect(ip="0.0.0.0", port="1001", connection_type="server", RSA=True)

server.send("Can you here me?")
print(server.recv())

'''Not required to close the connection, but it's good practice. Close server connections only
if you don't plan on connecting to any more clients'''
server.close_connection()

Client Configuration

#Connect to server
client = connect(ip="0.0.0.0", port="1001", connection_type="client", RSA=True)

print(server.recv())
client.send("Loud and clear!")

#Not required to close the connection, but it's good practice
client.close_connection()

Required Dependences From PyPi

pycryptodome == 3.14.1

listcrypt == 0.1.8

rapidrsa == 0.0.5


Documentation

'''
Module to simplify the process of creating servers and clients, with seamless built in encryption options
Classes:
    connect(self, ip:str, port:int, connection_type:str, key=None, RSA=None, socket_timeout=3)
        Class for easily creating socket connections, with built in encryption options. It's pointless
        to set the RSA parameter when connection_type='client', since the server decides whether or not to use RSA.
    Methods:
        create_secure_connection(self, rsa_enabled: bool) -> bool
            Uses RSA cryptography to automatically share a key between the server and client,
            for use in symmetric encryption for any future messages
        send(self, data: any) -> bool
            Sends the data
        recv() -> any
            Ensures successful receival of data sent from the 'send' method            

        close_connection(self) -> bool
            Close the connection between the client and server. Both sides can use this method.
            This isn't always necessary, but it's good practice to close connections you're no
            longer using
'''

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

supersockets-0.0.6.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

supersockets-0.0.6-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file supersockets-0.0.6.tar.gz.

File metadata

  • Download URL: supersockets-0.0.6.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

File hashes

Hashes for supersockets-0.0.6.tar.gz
Algorithm Hash digest
SHA256 8dbbeb6ad15fbd75f00ede366f2bb9487311aee16ce8b559dab5b4db1b995495
MD5 3e607998a444d0935e62769ba057ffb4
BLAKE2b-256 63cf55436389a18c16fa109d11e2c53d6b7f939523ae47bccddf0a565ddf790e

See more details on using hashes here.

File details

Details for the file supersockets-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: supersockets-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

File hashes

Hashes for supersockets-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 0093b9c552e7e20617d1f5e649a50fc187beb5d053f2c9ef0d8b7a3f3cddf33a
MD5 f2ad07a1bf3bf33c1a9700174f4fa4fc
BLAKE2b-256 153fb408837f6b30370095b3b62c06ac764f7d883a2caf54e63c14537b4a1943

See more details on using hashes here.

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