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
unencryptedsocket-0.7.0.tar.gz
(15.8 kB
view hashes)
Built Distribution
Close
Hashes for unencryptedsocket-0.7.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa16bef299d71bfe04a6f65606e615dce505e07914e784390e0e385608b15d06 |
|
MD5 | 46d4ed906953febec536c4b9737af28e |
|
BLAKE2b-256 | c2af4714f39a2b1fcdf472accabc1c05b99d7b3b9fe68a90b7e0e924e07c880e |