Skip to main content

Module peer

Module peer 

Source
Expand description

Devices behind a real file descriptor: a TCP serial bridge and (unix) a PTY pair.

Structs§

Pty
Both ends of a pseudo terminal.
Server
A running device thread; dropping it ends the thread.

Traits§

Io
The device side of a port: a PTY master or the TCP peer.

Functions§

accept
The connection the host opened to listener (a blocking one, as tcp_listener gives; it is blocking again afterwards).
pty
A new PTY pair.
recv_until
Read from the device side until done holds for everything read; panics after WAIT, and at once when the host closed the connection for good.
serve
Run modem on the device side until the Server is dropped, or the host closed a connection that does not come back (a TCP bridge; a PTY is served again when it is reopened). It sets the timeouts of io.
tcp_listener
A TCP serial bridge: the listener and the tcp:// path to open.