Struct rotor_stream::Persistent
[−]
[src]
pub struct Persistent<P> where P: Protocol, P::Socket: ActiveStream(_, _, _);
Persistent client connection
TODO(tailhook) this should include name resolution
Methods
impl<P> Persistent<P> where P: Protocol, P::Socket: ActiveStream, P::Socket::Address: Debug
fn new<S: GenericScope>(_scope: &mut S, address: P::Socket::Address, seed: P::Seed) -> Response<Persistent<P>, Void>
fn connect<S: GenericScope>(scope: &mut S, address: P::Socket::Address, seed: P::Seed) -> Response<Persistent<P>, Void>
impl<P> Persistent<P> where P: Protocol, P::Socket: ActiveStream
fn transport(&mut self) -> Option<Transport<P::Socket>>
Get a Transport
object of the underlying stream
This method is only useful if you want to manipulate buffers externally (like pushing to the buffer from another thread). Just be sure to wake up state machine after manipulating buffers.
Returns None
if stream is not currently connected
fn protocol(&mut self) -> Option<&mut P>
Get a Protocol
object for the stream
This method is only useful if you want to adjust protocol dysyr externally (like update some values after pushing data to buffer). Just be sure to wake up state machine if needed by the protocol.