Struct tokio_zmq::socket::ControlledSocket
[−]
[src]
pub struct ControlledSocket { /* fields omitted */ }
Defines a raw ControlledSocket
type
Controlled sockets are useful for being able to stop streams. They shouldn't be created
directly, but through a wrapper type's controlled
method.
Methods
impl ControlledSocket
[src]
fn sink<E>(&self) -> MultipartSink<E> where
E: From<Error>,
[src]
E: From<Error>,
Retrieve a sink that consumes multiparts, sending them to the socket.
fn stream<H>(&self, handler: H) -> ControlledStream<H> where
H: ControlHandler,
[src]
H: ControlHandler,
Retrieve a stream that produces multiparts, stopping when the should_stop control handler returns true.
fn send(&self, multipart: Multipart) -> MultipartRequest
[src]
Sends a single multipart to the socket
fn recv(&self) -> MultipartResponse
[src]
Receives a single multipart from the socket