Secured yet simple socket server-client for interprocess communications.
Project description
Encrypted Socket Server
Secured yet simple socket server-client for interprocess communications.
Hierarchy
encrypted_socket_server
|---- SS()
| |---- start()
| '---- stop()
'---- SC()
'---- request()
Example
python
# You can start an unencrypted socket server if you know what you are doing
# SS(host="remote ip", port=12321, encrypted=False)
# SC(host="remote ip", port=12321, encrypted=False)
from encrypted_socket_server import *
# server
def test(data: Any) -> str:
return f"Data:\t{data}"
functions = dict(test=test)
SS(functions=functions).start()
print("test socket server started.", flush=True)
# # Nothing is printed, you must start it from an other thread
# client
for i in range(5):
print(SC().request(command="test", data=f"Hello, {i}!"))
print("test socket client started.", flush=True)
# Data: Hello, 0!
# Data: Hello, 1!
# Data: Hello, 2!
# Data: Hello, 3!
# Data: Hello, 4!
# test socket client started.
shell
rem encrypted_socket_server.exe {server|client}
rem echo test server-client example
encrypted_socket_server.exe server
encrypted_socket_server.exe client
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
encryptedsocket-0.0.21.tar.gz
(3.4 kB
view hashes)
Built Distribution
Close
Hashes for encryptedsocket-0.0.21-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c61b05eeec7079bd5f7e696912795fc7e0dba6fdab748dfdf000cf43f4db8c92 |
|
MD5 | a07085e7b7ff71073b2a15f6c5fb58d2 |
|
BLAKE2b-256 | 70bf59a26d9f74b517e08100a2ce299c1f9cff3360761151dab1a65031d12b46 |