Struct station::pubsub::Publisher [−][src]
pub struct Publisher<T> { /* fields omitted */ }
Expand description
The Publisher publishes messages of type T
to its subscribers.
Implementations
Create a new publisher with a name.
Args:
name
: The name of the publisher.
Publish a message to the subscribers.
By default, the publisher has no subscribers. Subscribers must be added before the publish
method does anything. Without subscribers, publish
is a no-op.
Add a UDP endpoint to publish to.
Args:
addr
: The address of the UDP endpoint.
Add a Unix Datagram endpoint to publish to.
Args:
path
: The Unix socket path to publish to.
Return the total number of Publish endpoints.