[][src]Module async_zmq::pair

PAIR socket module of Exclusive pair pattern in ZMQ

Use pair function to instantiate a pair socket and the you will be able to use methods from both Sink/SinkExt and Stream/StreamExt traits.

Example

use async_zmq::{Result, SinkExt};

#[async_std::main]
async fn main() -> Result<()> {
    let mut zmq = async_zmq::pair("tcp://127.0.0.1:5555")?.bind()?;

    zmq.send(vec!["broadcast message"]).await?;
    Ok(())
}

Structs

Pair

The async wrapper of ZMQ socket with PAIR type

Functions

pair

Create a ZMQ socket with PAIR type