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
smc_a = SimpleMessageChannel()
smc_b = SimpleMessageChannel()
payload = smc_b.send(0, 1, b"foo")
print(f"sent: {payload}")
for idx in range(0, len(payload)):
smc_a.recv(payload[idx : idx + 1])
for msg in smc_a.messages:
print(f"received: {msg}")
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.1a1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6414df30985a4931669582d84880bec3eca8d761e298136bd8dee0cbd5ae73b |
|
MD5 | 42795c9d3801e9456c3b7806498edc97 |
|
BLAKE2b-256 | 6546fd99ee0606b8855173e6f9c4c7602c2f99338e7869fc252877b00730c7f1 |
Close
Hashes for simple_message_channels-0.0.1a1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ec3b8c51bae6cdbf20fadd2aa5fe9a329816b9a101bea2fbc0cc6a11674c6b4 |
|
MD5 | 7106b28ceb577cd7192cdd73fcc085ae |
|
BLAKE2b-256 | 69384ad45f11742cb089956aa924beb061b61efb1561e04c8f4857883b0e62d0 |