Sans I/O wire protocol for Hypercore
Project description
simple-message-channels
Sans I/O wire protocol for Hypercore
Install
$ pip install simple-message-channels
Example
from simple_message_channels import SimpleMessageChannel
smc1 = SimpleMessageChannel()
smc2 = SimpleMessageChannel()
payload = smc1.send(0, 1, b"foo")
print(f"sent: {payload}")
for idx in range(0, len(payload)):
smc2.recv(payload[idx : idx + 1])
print(f"received: {smc2.messages}")
Output:
sent: b'\x04\x01foo'
received: [(0, 1, b'foo')]
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
Built Distribution
Close
Hashes for simple-message-channels-0.0.1a2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ecb84594500dec42e984399720e38092dc8ad93645ed097b4575da9350b4098 |
|
MD5 | 01a361ea0d7a66171a96e36def6c8f1c |
|
BLAKE2b-256 | 40e83a2eeb8bfb78724259e5d6106e89714b8049b124e28262598eed465a81cc |
Close
Hashes for simple_message_channels-0.0.1a2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2c5d85c2f4ad777f291a0fd85e804211abb46d6e7a6bf6174cba474b66efa93 |
|
MD5 | cf2f867536a6467dfc769c065f1159b0 |
|
BLAKE2b-256 | 085985d83d7225b72bd7b8258678e1ffbcc8c94c570bf202d54b4fede8bae82b |