phasm-platform/examples/echoclient.py
Johan B.W. de Vries 5e1c5679e5 prelude.log_bytes is now on the right thread
Before, all messages would be logged on the prelude
container / thread.

routing log improvements
2023-04-14 19:09:20 +02:00

13 lines
258 B
Python

@imported('echoserver')
def echo(msg: bytes) -> bytes:
pass
@imported('prelude')
def log_bytes(data: bytes) -> None:
pass
@exported
def on_module_loaded() -> None:
log_bytes(b'Echo client starting up, calling server')
log_bytes(echo(b'Hello, world!'))