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]
pub fn builder(ctx: Arc<Context>) -> SocketBuilder<'static>
[src]
Start a new Socket Config builder
pub fn inner(self) -> (Socket, PollEvented2<File<ZmqFile>>)
[src]
Retrieve a Reference-Counted Pointer to self's socket.
pub fn from_sock_and_file(
sock: Socket,
file: PollEvented2<File<ZmqFile>>
) -> Self
[src]
sock: Socket,
file: PollEvented2<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.
pub fn sink(self) -> MultipartSink
[src]
Retrieve a Sink that consumes Multiparts, sending them to the socket
pub fn stream(self) -> MultipartStream
[src]
Retrieve a Stream that produces Multiparts, getting them from the socket
pub fn sink_stream(self) -> MultipartSinkStream
[src]
Retrieve a structure that is both a Stream that produces Multiparts and a Sink that consumes Multiparts.
pub fn send<T>(self, multipart: Multipart) -> MultipartRequest<T> where
T: From<(Socket, PollEvented2<File<ZmqFile>>)>,
[src]
T: From<(Socket, PollEvented2<File<ZmqFile>>)>,
Retrieve a Future that consumes a multipart, sending it to the socket
pub fn recv<T>(self) -> MultipartResponse<T> where
T: From<(Socket, PollEvented2<File<ZmqFile>>)>,
[src]
T: From<(Socket, PollEvented2<File<ZmqFile>>)>,
Retrieve a Future that produces a multipart, getting it fromthe socket