Trait cdrs::transport::CDRSTransport[][src]

pub trait CDRSTransport: Sized + Read + Write + Send + Sync {
    fn try_clone(&self) -> Result<Self>;
fn close(&mut self, close: Shutdown) -> Result<()>;
fn set_timeout(&mut self, dur: Option<Duration>) -> Result<()>;
fn is_alive(&self) -> bool; }

General CDRS transport trait. Both [TranportTcp][transportTcp] and [TransportTls][transportTls] has their own implementations of this trait. Generaly speaking it extends/includes io::Read and io::Write traits and should be thread safe. [transportTcp]:struct.TransportTcp.html [transportTls]:struct.TransportTls.html

Required Methods

Creates a new independently owned handle to the underlying socket.

The returned TcpStream is a reference to the same stream that this object references. Both handles will read and write the same stream of data, and options set on one stream will be propagated to the other stream.

Shuts down the read, write, or both halves of this connection.

Method which set given duration both as read and write timeout. If the value specified is None, then read() calls will block indefinitely. It is an error to pass the zero Duration to this method.

Method that checks that transport is alive

Implementors