pub struct PushSocket { /* private fields */ }Expand description
Push socket (PUSH). Distributes messages round-robin to connected PULL peers.
Use with PullSocket to build a pipeline. Each message
goes to exactly one peer.
See RFC 30 for the PUSH/PULL wire
contract and zmq_socket(3).
Trait Implementations§
Source§impl Socket for PushSocket
impl Socket for PushSocket
type Backend = GenericSocketBackend
Source§fn with_options(options: SocketOptions) -> Self
fn with_options(options: SocketOptions) -> Self
Create a socket with the given options.
Source§async fn connect<E>(&mut self, endpoint: E) -> ZmqResult<()>
async fn connect<E>(&mut self, endpoint: E) -> ZmqResult<()>
Connects to the given endpoint. Read more
Source§fn builder() -> SocketBuilder<Self>
fn builder() -> SocketBuilder<Self>
Create a
SocketBuilder to configure the socket before constructing it.Source§fn bind<E>(
&mut self,
endpoint: E,
) -> impl Future<Output = ZmqResult<Endpoint>> + Send
fn bind<E>( &mut self, endpoint: E, ) -> impl Future<Output = ZmqResult<Endpoint>> + Send
Binds to the endpoint and starts a coroutine to accept new connections
on it. Returns the resolved bound endpoint. Read more
Source§fn last_endpoint(&self) -> Option<&Endpoint>
fn last_endpoint(&self) -> Option<&Endpoint>
Returns the last endpoint resolved by
bind, or None
if the socket has not been bound.Source§fn unbind(
&mut self,
endpoint: Endpoint,
) -> impl Future<Output = ZmqResult<()>> + Send
fn unbind( &mut self, endpoint: Endpoint, ) -> impl Future<Output = ZmqResult<()>> + Send
Stop accepting connections on the given endpoint.
Source§fn unbind_all(&mut self) -> impl Future<Output = Vec<ZmqError>> + Send
fn unbind_all(&mut self) -> impl Future<Output = Vec<ZmqError>> + Send
Stop accepting connections on all bound endpoints.
Source§fn monitor(&mut self) -> Receiver<SocketEvent>
fn monitor(&mut self) -> Receiver<SocketEvent>
Subscribe to
SocketEvents. Returns a channel receiver that yields
events as connections are made, accepted, or dropped. Read moreSource§impl SocketSend for PushSocket
impl SocketSend for PushSocket
impl CaptureSocket for PushSocket
Auto Trait Implementations§
impl !Freeze for PushSocket
impl !RefUnwindSafe for PushSocket
impl Send for PushSocket
impl Sync for PushSocket
impl Unpin for PushSocket
impl UnsafeUnpin for PushSocket
impl !UnwindSafe for PushSocket
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more