[−][src]Module async_zmq::publish
PUB socket module of Pub-Sub pattern in ZMQ
Use publish
function to instantiate a publisher and the you will be able to use methods from Sink
/SinkExt
trait.
Example
use async_zmq::{Result, SinkExt}; #[async_std::main] async fn main() -> Result<()> { let mut zmq = async_zmq::publish("tcp://127.0.0.1:5555")?.bind()?; zmq.send(vec!["topic", "broadcast message"]).await?; Ok(()) }
Structs
Publish | The async wrapper of ZMQ socket with PUB type |
Functions
publish | Create a ZMQ socket with PUB type |