Fix up example
This commit is contained in:
parent
2ea20165f4
commit
9f70ecf4be
@ -21,10 +21,10 @@ smc_a = SimpleMessageChannel()
|
|||||||
smc_b = SimpleMessageChannel()
|
smc_b = SimpleMessageChannel()
|
||||||
|
|
||||||
payload = smc_b.send(0, 1, b"foo")
|
payload = smc_b.send(0, 1, b"foo")
|
||||||
print(f"sent: {payload})
|
print(f"sent: {payload}")
|
||||||
|
|
||||||
for idx in range(0, len(payload)):
|
for idx in range(0, len(payload)):
|
||||||
smc_a.recv(payload[idx, idx + 1])
|
smc_a.recv(payload[idx : idx + 1])
|
||||||
|
|
||||||
for msg in smc_a.messages:
|
for msg in smc_a.messages:
|
||||||
print(f"received: {msg}")
|
print(f"received: {msg}")
|
||||||
@ -33,6 +33,6 @@ for msg in smc_a.messages:
|
|||||||
Output:
|
Output:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sent: ...
|
sent: b'\x04\x01foo'
|
||||||
received: (0, 1, b"foo")
|
received: (0, 1, b'foo')
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user