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.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.0.tar.gz
(2.9 kB
view hashes)
Built Distribution
Close
Hashes for simpleprotocol-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54e0ecb116e5941b57f2c166bb744e3f2c0be4eac8432fb947b8984f5eb53ef6 |
|
MD5 | e90a3fce66f6cbf538726e7407d98a0a |
|
BLAKE2b-256 | 283a5ad4d1111922681545ec04432d0cc888c99499002207af5043035dd2d694 |