Sans I/O wire protocol for Hypercore
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
Luke Murphy 50f84dfa08
Fix up example, push out a2
6 months ago
simple_message_channels Appease CI setup 6 months ago
test Appease CI setup 6 months ago
.drone.yml Bootstrap SMC 8 months ago
.gitignore Bootstrap SMC 8 months ago
CHANGELOG.md Fix up example, push out a2 6 months ago
LICENSE Bootstrap SMC 8 months ago
README.md Fix up example, push out a2 6 months ago
poetry.lock Add lock file 7 months ago
pyproject.toml Fix up example, push out a2 6 months ago

README.md

simple-message-channels

Build Status

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')]