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 details)
Built Distribution
File details
Details for the file unencryptedsocket-0.8.0.tar.gz
.
File metadata
- Download URL: unencryptedsocket-0.8.0.tar.gz
- Upload date:
- Size: 15.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a095d6e8327120ac81c08baed79498da5b04474226d938dd6b34e574ab7158b8 |
|
MD5 | 82f362a257cfe4d4103eb758151c00ae |
|
BLAKE2b-256 | c98e92101ddf9e516fab230ebaef4ef01520826f2077b293e980148050faabb9 |
File details
Details for the file unencryptedsocket-0.8.0-py3-none-any.whl
.
File metadata
- Download URL: unencryptedsocket-0.8.0-py3-none-any.whl
- Upload date:
- Size: 16.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a700978b8b88b387853cda00edbf4c87d67f228713331e7f1ccd034bbb272ac |
|
MD5 | fb14d3d688a44b9cd8f33506e4da843b |
|
BLAKE2b-256 | 0f1aea101cea28f3511dc292e54520fdcdcd88eac594ddd58d229fce487c0ca8 |