Struct scaproust::Session
[−]
[src]
pub struct Session { /* fields omitted */ }
Creates sockets and devices.
Methods
impl Session
[src]
fn create_socket<T>(&mut self) -> Result<Socket> where
T: Protocol + From<Sender<Reply>> + 'static,
[src]
T: Protocol + From<Sender<Reply>> + 'static,
Creates a socket with the specified protocol, which in turn determines its exact semantics. See the proto module for a list of built-in protocols. The newly created socket is initially not associated with any endpoints. In order to establish a message flow at least one endpoint has to be added to the socket using connect and bind methods.
fn create_relay_device(&self, socket: Socket) -> Result<Box<Device>>
[src]
Creates a loopback device that loops and sends any messages received from the socket back to itself.
fn create_bridge_device(
&mut self,
left: Socket,
right: Socket
) -> Result<Box<Device>>
[src]
&mut self,
left: Socket,
right: Socket
) -> Result<Box<Device>>
Creates a bridge device to forward messages between two sockets.
It loops and sends any messages received from left
to right
and vice versa.
fn create_probe(&mut self, poll_opts: Vec<PollReq>) -> Result<Probe>
[src]
Creates a probe for polling sockets