simple-message-channels/README.md

31 lines
539 B
Markdown
Raw Normal View History

2020-06-29 23:53:17 +00:00
# simple-message-channels
2020-06-29 23:54:30 +00:00
[![Build Status](https://drone.autonomic.zone/api/badges/hyperpy/simple-message-channels/status.svg)](https://drone.autonomic.zone/hyperpy/simple-message-channels)
## Sans I/O wire protocol for Hypercore
2020-06-29 23:53:17 +00:00
2020-07-07 14:05:55 +00:00
## Install
2020-06-29 23:53:17 +00:00
```sh
$ pip install simple-message-channels
```
2020-07-07 14:05:55 +00:00
## Example
```python
2020-08-01 16:53:22 +00:00
from simple_message_channels import SimpleMessageChannel
smc = SimpleMessageChannel()
send = smc.send(1, 2, b"foo")
recv = smc.recv(send_payload)
print(f"send: {send}", f"recv: {recv}, sep="\n")
```
Output:
```sh
2020-07-07 14:05:55 +00:00
```