Skip to main content

Sans I/O wire protocol for Hypercore

Project description

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

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simple-message-channels-0.0.1a1.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file simple-message-channels-0.0.1a1.tar.gz.

File metadata

  • Download URL: simple-message-channels-0.0.1a1.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.9 CPython/3.8.0 Linux/4.9.0-13-amd64

File hashes

Hashes for simple-message-channels-0.0.1a1.tar.gz
Algorithm Hash digest
SHA256 b6414df30985a4931669582d84880bec3eca8d761e298136bd8dee0cbd5ae73b
MD5 42795c9d3801e9456c3b7806498edc97
BLAKE2b-256 6546fd99ee0606b8855173e6f9c4c7602c2f99338e7869fc252877b00730c7f1

See more details on using hashes here.

File details

Details for the file simple_message_channels-0.0.1a1-py3-none-any.whl.

File metadata

File hashes

Hashes for simple_message_channels-0.0.1a1-py3-none-any.whl
Algorithm Hash digest
SHA256 2ec3b8c51bae6cdbf20fadd2aa5fe9a329816b9a101bea2fbc0cc6a11674c6b4
MD5 7106b28ceb577cd7192cdd73fcc085ae
BLAKE2b-256 69384ad45f11742cb089956aa924beb061b61efb1561e04c8f4857883b0e62d0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page