Enum nanomsg::Protocol[][src]

pub enum Protocol {
    Req,
    Rep,
    Push,
    Pull,
    Pair,
    Bus,
    Pub,
    Sub,
    Surveyor,
    Respondent,
}

Type-safe protocols that Nanomsg uses. Each socket is bound to a single protocol that has specific behaviour (such as only being able to receive messages and not send them).

Variants

Used to implement the client application that sends requests and receives replies.

See also: Socket::set_request_resend_interval

Used to implement the stateless worker that receives requests and sends replies.

This socket is used to send messages to a cluster of load-balanced nodes. Receive operation is not implemented on this socket type.

This socket is used to receive a message from a cluster of nodes. Send operation is not implemented on this socket type.

Socket for communication with exactly one peer. Each party can send messages at any time. If the peer is not available or send buffer is full subsequent calls to write will block until it’s possible to send the message.

Sent messages are distributed to all nodes in the topology. Incoming messages from all other nodes in the topology are fair-queued in the socket.

This socket is used to distribute messages to multiple destinations. Receive operation is not defined.

Receives messages from the publisher. Only messages that the socket is subscribed to are received. When the socket is created there are no subscriptions and thus no messages will be received. Send operation is not defined on this socket.

See also: Socket::subscribe and Socket::unsubscribe.

Used to send the survey. The survey is delivered to all the connected respondents. Once the query is sent, the socket can be used to receive the responses. When the survey deadline expires, receive will return Timeout error.

See also: Socket::set_survey_deadline

Use to respond to the survey. Survey is received using receive function, response is sent using send function This socket can be connected to at most one peer.

Trait Implementations

impl Debug for Protocol
[src]

Formats the value using the given formatter. Read more

impl PartialEq for Protocol
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Clone for Protocol
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for Protocol
[src]

Auto Trait Implementations

impl Send for Protocol

impl Sync for Protocol