Struct tokio_irc_client::client::Client
[−]
[src]
pub struct Client { /* fields omitted */ }
A light-weight client type for establishing connections to remote servers.
This type consumes a given SocketAddr
and provides several methods for
establishing connections to a remote server. Currently these methods
allow for the connection to a server with unencrypted data and TLS
encrypted data.
Each of the connection methods will return a future, that when successfully
resolved, will provide a Stream
that allows for communication with the
remote server.
Methods
impl Client
[src]
fn new<H: Into<SocketAddr>>(host: H) -> Client
Create a new instance of Client
that provides the ability to establish
remote server connections with the specified host.
fn connect(&self, handle: &Handle) -> ClientConnectFuture
Returns a future, that when resolved provides an unecrypted Stream
that can be used to receive Message
from the server and send Message
to the server.
The resulting Stream
can be split
into a separate Stream
for
receiving Message
from the server and a Sink
for sending Message
to the server.