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 references 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 port 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
unencryptedsocket-0.8.0.tar.gz
(15.8 kB
view hashes)
Built Distribution
Close
Hashes for unencryptedsocket-0.8.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a700978b8b88b387853cda00edbf4c87d67f228713331e7f1ccd034bbb272ac |
|
MD5 | fb14d3d688a44b9cd8f33506e4da843b |
|
BLAKE2b-256 | 0f1aea101cea28f3511dc292e54520fdcdcd88eac594ddd58d229fce487c0ca8 |