Module rpcio

Module rpcio 

Source
Expand description

RPC I/O adapters for different transport modes. Port of Go’s pkg/wshutil/wshrpcio.go.

Provides adapters to convert between:

  • Stream (JSON lines) ↔ message channels
  • PTY (OSC-wrapped) ↔ message channels
  • WebSocket (JSON packets) ↔ message channels

Functions§

adapt_msg_ch_to_pty
Read messages from a channel and write them as OSC-escaped sequences to a PTY.
adapt_output_ch_to_stream
Read messages from a channel and write them as JSON lines to a stream.
adapt_stream_to_msg_ch
Read JSON lines from a stream and send them to a channel.