[][src]Enum nng::Protocol

pub enum Protocol {
    Bus0,
    Pair0,
    Pair1,
    Pub0,
    Pull0,
    Push0,
    Rep0,
    Req0,
    Respondent0,
    Sub0,
    Surveyor0,
}

Describes a relationship between a socket and all sockets to which it is connected.

Variants

Bus0

Version 0 of the bus protocol.

The bus protocol provides for building mesh networks where every peer is connected to every other peer. In this protocol, each message sent by a node is sent to every one of its directly connected peers. See the bus documentation for more information.

Pair0

Version 0 of the pair protocol.

The pair protocol implements a peer-to-peer pattern, where relationships between peers are one-to-one. See the pair documentation for more information.

Pair1

Version 1 of the pair protocol.

The pair protocol implements a peer-to-peer pattern, where relationships between peers are one-to-one. Version 1 of this protocol supports and optional polyamorous mode. See the pair documentation for more information.

Pub0

Version 0 of the publisher protocol.

The pub protocol is one half of a publisher/subscriber pattern. In this pattern, a publisher sends data, which is broadcast to all subscribers. The subscribing applications only see the data to which they have subscribed. See the publisher/subscriber documentation for more information.

Pull0

Version 0 of the pull protocol.

The pull protocol is one half of a pipeline pattern. The other half is the push protocol. In the pipeline pattern, pushers distribute messages to pullers. Each message sent by a pusher will be sent to one of its peer pullers, chosen in a round-robin fashion from the set of connected peers available for receiving. This property makes this pattern useful in load-balancing scenarios.

See the pipeline documentation for more information.

Push0

Version 0 of the push protocol.

The push protocol is one half of a pipeline pattern. The other side is the pull protocol. In the pipeline pattern, pushers distribute messages to pullers. Each message sent by a pusher will be sent to one of its peer pullers, chosen in a round-robin fashion from the set of connected peers available for receiving. This property makes this pattern useful in load-balancing scenarios.

See the pipeline documentation for more information.

Rep0

Version 0 of the reply protocol.

The rep protocol is one half of a request/reply pattern. In this pattern, a requester sends a message to one replier, who is expected to reply. The request is resent if no reply arrives, until a reply is received or the request times out.

See the request/reply documentation for more information.

Req0

Version 0 of the request protocol.

The req protocol is one half of a request/reply pattern. In this pattern, a requester sends a message to one replier, who is expected to reply. The request is resent if no reply arrives, until a reply is received or the request times out.

See the request/reply documentation for more information.

Respondent0

Version 0 of the respondent protocol.

The respondent protocol is one half of a survey pattern. In this pattern, a surveyor sends a survey, which is broadcast to all peer respondents. The respondents then have a chance to reply (but are not obliged to reply). The survey itself is a timed event, so that responses received after the survey has finished are discarded.

See the survery documentation for more information.

Sub0

Version 0 of the subscriber protocol.

The sub protocol is one half of a publisher/subscriber pattern. In this pattern, a publisher sends data, which is broadcast to all subscribers. The subscribing applications only see the data to which they have subscribed.

See the publisher/subscriber documentation for more information.

Surveyor0

Version 0 of the surveyor protocol.

The surveyor protocol is one half of a survey pattern. In this pattern, a surveyor sends a survey, which is broadcast to all peer respondents. The respondents then have a chance to reply (but are not obliged to reply). The survey itself is a timed event, so that responses received after the survey has finished are discarded.

See the survey documentation for more information.

Trait Implementations

impl Clone for Protocol[src]

impl Copy for Protocol[src]

impl Eq for Protocol[src]

impl Ord for Protocol[src]

impl PartialEq<Protocol> for Protocol[src]

impl PartialOrd<Protocol> for Protocol[src]

impl Debug for Protocol[src]

impl Display for Protocol[src]

impl Hash for Protocol[src]

impl StructuralPartialEq for Protocol[src]

impl StructuralEq for Protocol[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]