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())
Client Configuration
from supersockets import connect
#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!")
Required Dependences From PyPi
pycryptodome == 3.15.0
listcrypt == 0.2.2
rapidrsa == 0.0.6
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
__del__(self) -> bool
Automatically closes the connection between the
client and server upon the programs end.
'''
Project details
Release history Release notifications | RSS feed
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.7.tar.gz
(5.4 kB
view hashes)
Built Distribution
Close
Hashes for supersockets-0.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b186e85cdc28ed00b45d5c602526144c611835f89c19ecb264d0c0b3019935d |
|
MD5 | b27ace5faaa2f57cc85dbc882423ca37 |
|
BLAKE2b-256 | 01431faf8343162494da64c6cf9afe8c4d4dccc86a5e5a1bdeb7715f321c7599 |