Struct tokio_zmq::socket::Socket
[−]
[src]
pub struct Socket { /* fields omitted */ }
Defines the raw Socket type. This type should never be interacted with directly, except to create new instances of wrapper types.
Methods
impl Socket
[src]
fn new(ctx: Rc<Context>, handle: Handle) -> SockConfigStart
[src]
Start a new Socket Config builder
fn inner_sock(&self) -> Rc<Socket>
[src]
Retrieve a Reference-Counted Pointer to self's socket.
fn inner_file(&self) -> Rc<PollEvented<File<ZmqFile>>>
[src]
Retrieve a Reference-Counted Pointer to self's file.
fn from_sock_and_file(
sock: Rc<Socket>,
file: Rc<PollEvented<File<ZmqFile>>>
) -> Self
[src]
sock: Rc<Socket>,
file: Rc<PollEvented<File<ZmqFile>>>
) -> Self
Create a new socket from a given Sock and File
This assumes that sock
is already configured properly. Please don't call this directly
unless you know what you're doing.
fn controlled<S>(self, control: S) -> ControlledSocket where
S: StreamSocket,
[src]
S: StreamSocket,
Create a ControlledSocket from this and a controller socket
The resulting ControlledSocket receives it's main data from the current socket, and control commands from the control socket.
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(&self) -> MultipartStream<DefaultEndHandler>
[src]
Retrieve a Stream that produces Multiparts, getting them from the socket
fn stream_with_end<E>(&self, end_handler: E) -> MultipartStream<E> where
E: EndHandler,
[src]
E: EndHandler,
Retrieve a stream that produces Multiparts. This stream has an end condition
fn send(&self, multipart: Multipart) -> MultipartRequest
[src]
Retrieve a Future that consumes a multipart, sending it to the socket
fn recv(&self) -> MultipartResponse
[src]
Retrieve a Future that produces a multipart, getting it fromthe socket