CppServer  1.0.0.0
C++ Server Library
Classes | Enumerations | Functions
CppServer::Nanomsg Namespace Reference

Nanomsg definitions. More...

Classes

class  Bus
 Nanomsg bus node. More...
 
class  Client
 Nanomsg client. More...
 
class  Message
 Nanomsg message. More...
 
class  PairClient
 Nanomsg pair client. More...
 
class  PairServer
 Nanomsg pair server. More...
 
class  PushClient
 Nanomsg push client. More...
 
class  PushServer
 Nanomsg push server. More...
 
class  RequestClient
 Nanomsg request client. More...
 
class  RequestServer
 Nanomsg request server. More...
 
class  Server
 Nanomsg server. More...
 
class  Socket
 Nanomsg socket. More...
 
class  SubscribeClient
 Nanomsg subscribe client. More...
 
class  SubscribeServer
 Nanomsg subscribe server. More...
 
class  SurveyClient
 Nanomsg survey client. More...
 
class  SurveyServer
 Nanomsg survey server. More...
 

Enumerations

enum  Domain { Domain::Std = AF_SP, Domain::Raw = AF_SP_RAW }
 Nanomsg domain. More...
 
enum  Protocol {
  Protocol::Pair = NN_PAIR, Protocol::Request = NN_REQ, Protocol::Reply = NN_REP, Protocol::Publisher = NN_PUB,
  Protocol::Subscriber = NN_SUB, Protocol::Push = NN_PUSH, Protocol::Pull = NN_PULL, Protocol::Surveyor = NN_SURVEYOR,
  Protocol::Respondent = NN_RESPONDENT, Protocol::Bus = NN_BUS
}
 Nanomsg protocol. More...
 

Functions

void swap (Message &message1, Message &message2) noexcept
 
std::ostream & operator<< (std::ostream &stream, Domain domain)
 Stream output: Nanomsg domain. More...
 
std::ostream & operator<< (std::ostream &stream, Protocol protocol)
 Stream output: Nanomsg protocol. More...
 

Detailed Description

Nanomsg definitions.

Enumeration Type Documentation

◆ Domain

Nanomsg domain.

Enumerator
Std 

Standard full-blown socket.

Raw 

Raw socket.

Definition at line 41 of file nanomsg.h.

◆ Protocol

Nanomsg protocol.

Enumerator
Pair 

Socket for communication with exactly one peer.

Request 

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

Reply 

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

Publisher 

Distribute messages to multiple destinations. Receive operation is not defined.

Subscriber 

Receives messages from the publisher. Send operation is not defined.

Push 

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

Pull 

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

Surveyor 

Used to send the survey. The survey is delivered to all the connected respondents.

Respondent 

Use to respond to the survey. This socket can be connected to at most one peer.

Bus 

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.

Definition at line 56 of file nanomsg.h.

Function Documentation

◆ operator<<() [1/2]

std::ostream & CppServer::Nanomsg::operator<< ( std::ostream &  stream,
Domain  domain 
)

Stream output: Nanomsg domain.

Parameters
stream- Output stream
domain- Nanomsg domain
Returns
Output stream

Definition at line 14 of file nanomsg.cpp.

◆ operator<<() [2/2]

std::ostream & CppServer::Nanomsg::operator<< ( std::ostream &  stream,
Protocol  protocol 
)

Stream output: Nanomsg protocol.

Parameters
stream- Output stream
protocol- Nanomsg protocol
Returns
Output stream

Definition at line 27 of file nanomsg.cpp.

◆ swap()

void CppServer::Nanomsg::swap ( Message message1,
Message message2 
)
inlinenoexcept

Definition at line 20 of file message.inl.