A package for using a basic protocol socket
Project description
python-simpleprotocol
A small socket wrapper
Used for sending code, subcode, parameters.
Code: Integer
Subcode: Integer
Params: Array of strings
Only has basic use, as shown in this example:
Server:
import simpleprotocol
server = simpleprotocol.SimpleServer(port=8080)
while True:
handler = server.accept()
handler.send(0)
print(handler.get())
handler = server.accept()
handler.send(1)
print(handler.get())
Client:
import simpleprotocol
socket = simpleprotocol.SimpleProtocol()
if socket.get().code:
socket.send(1, 0, ["That sounds good!"])
else:
socket.send(1, 1, ["Oh dear, that's not right..."])
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
simpleprotocol-1.0.1.tar.gz
(2.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file simpleprotocol-1.0.1.tar.gz.
File metadata
- Download URL: simpleprotocol-1.0.1.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52b97447a1e534b37f8d6f5507d91f6623e611f52ab391283f0cb0b721665538
|
|
| MD5 |
43835d4eae3e926094188ca09d713923
|
|
| BLAKE2b-256 |
7d33708e9fbda9bb64e97998070ce945c84f132e4a2430b143bb3f9b440dfb54
|
File details
Details for the file simpleprotocol-1.0.1-py3-none-any.whl.
File metadata
- Download URL: simpleprotocol-1.0.1-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a631990d6fc9a96b3da4fccfb2a54ff1e6970305f415c4996da438db83f450d
|
|
| MD5 |
e5e2069429e406b0516e9fb708b99f78
|
|
| BLAKE2b-256 |
87bfe48e248090bc9f5d054ad353e77c80371fc5d0b5b2eb3ea8d73b59293c8d
|