Struct irc::client::conn::NetConnection
[−]
[src]
pub struct NetConnection { /* fields omitted */ }
A thread-safe connection over a buffered NetStream.
Methods
impl NetConnection
[src]
fn connect(host: &str, port: u16) -> Result<NetConnection>
Creates a thread-safe TCP connection to the specified server.
fn connect_ssl(host: &str, port: u16) -> Result<NetConnection>
Creates a thread-safe TCP connection to the specified server over SSL. If the library is compiled without SSL support, this method panics.
Trait Implementations
impl Connection for NetConnection
[src]
fn send(&self, msg: &str, encoding: &str) -> Result<()>
Sends a message over this connection.
fn recv(&self, encoding: &str) -> Result<String>
Receives a single line from this connection.
fn written(&self, _: &str) -> Option<String>
Gets the full record of all sent messages if the Connection records this. This is intended for use in writing tests. Read more
fn reconnect(&self) -> Result<()>
Re-establishes this connection, disconnecting from the existing case if necessary.