Skip to main content

Module net

Module net 

Source
Expand description

Shared plumbing for the IMAP and SMTP clients: a stream that is either plain TCP or TLS (rustls), plus a buffered line reader whose writes go straight through to the socket.

Structs§

Cutoff
A way to cut a connection short from another thread: shutting the socket down makes whatever is blocked on it fail at once, which is how mutt’s Ctrl+G gets its abort.

Functions§

io_timeout
How long a read or a write waits before giving up.
set_timeouts
Set both, in seconds; a connect timeout of 0 waits as long as the OS does.
set_trust
Install the trust settings from the config, once, before any connection. Only ever adds anchors to the Mozilla baseline; it cannot take the default roots away.