Skip to main content

Module transport

Module transport 

Source
Expand description

Outbound TCP connections and name resolution.

dial opens every outbound TCP connection of this crate: the broker connections of Connection and the connections to an OAuth token endpoint. By default it connects through the operating system.

An embedder that supplies its own sockets installs a Connector once per process with install_connector. After that, dial gets every connection from the connector. WASI preview 1 has no connect call, so on target_os = "wasi" a connector is the only source of connections.

resolve turns a host:port address into socket addresses. An IP address literal needs no lookup on any target. WASI has no name resolution, so on WASI a host name is an error.

Structs§

ConnectorAlreadyInstalled
The error of install_connector when the process already has a connector.
SocketOptions
Socket settings that dial applies to a connection that it opens through the operating system.

Traits§

Connector
A source of outbound TCP connections in place of the operating system.

Functions§

dial
Open a TCP connection to host at port.
install_connector
Make connector the source of every connection that dial opens.
resolve
Resolve a host:port address to the socket addresses to connect to, in order.

Type Aliases§

ConnectFuture
The future of Connector::connect.