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§
- Connector
Already Installed - The error of
install_connectorwhen the process already has a connector. - Socket
Options - Socket settings that
dialapplies 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
hostatport. - install_
connector - Make
connectorthe source of every connection thatdialopens. - resolve
- Resolve a
host:portaddress to the socket addresses to connect to, in order.
Type Aliases§
- Connect
Future - The future of
Connector::connect.