Simple socket server-client for interprocess communications without security
Project description
Unencrypted Socket
Simple socket server-client for interprocess communications without security
Hierarchy
unencryptedsocket
|---- SS
'---- SC
Example
python
# You can transmit objects as long as
# both sides have access to their classes
from unencryptedsocket import *
# server
def test(data):
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
sc = SC()
for i in range(5):
print(sc.request(command="test", data=args(f"Hello, {i}!")))
for i in range(5):
print(SC().request(command="test", data=args(f"Hello, {i}!")))
print("test socket client started.", flush=True)
# # both for loops produce same result
# # while the later one uses a new key in each loop
# Data: Hello, 0!
# Data: Hello, 1!
# Data: Hello, 2!
# Data: Hello, 3!
# Data: Hello, 4!
# test socket client started.
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
Built Distribution
Close
Hashes for unencryptedsocket-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3206975e61c2b40ef9c1eb17da1cf1e4ab16f0de3116284a0b0caa8b3dc11ebf |
|
MD5 | 17dafcc28b02354ab74e5e0a0cbfe44e |
|
BLAKE2b-256 | ef28589aa383d4f3c3f0ae992b0e2290f2e5d468d7da2d83712137b420e8929a |