|
CppServer
1.0.0.0
C++ Server Library
|
#include <push_server.h>
Public Member Functions | |
| PushServer (const std::string &address, bool threading=true) | |
| Initialize server with a given endpoint address. More... | |
| PushServer (const PushServer &)=delete | |
| PushServer (PushServer &&)=default | |
| virtual | ~PushServer ()=default |
| PushServer & | operator= (const PushServer &)=delete |
| PushServer & | operator= (PushServer &&)=default |
Public Member Functions inherited from CppServer::Nanomsg::Server | |
| Server (Domain domain, Protocol protocol, const std::string &address, bool threading=true) | |
| Initialize server with a given domain, protocol and endpoint address. More... | |
| Server (const Server &)=delete | |
| Server (Server &&)=default | |
| virtual | ~Server () |
| Server & | operator= (const Server &)=delete |
| Server & | operator= (Server &&)=default |
| Socket & | socket () noexcept |
| Get the Nanomsg socket. More... | |
| bool | IsStarted () const noexcept |
| Is the server started? More... | |
| bool | Start () |
| Start the server. More... | |
| bool | Stop () |
| Stop the server. More... | |
| bool | Restart () |
| Restart the server. More... | |
| size_t | Send (const void *buffer, size_t size) |
| Send data to the client. More... | |
| size_t | Send (const std::string &text) |
| Send a text string to the client. More... | |
| size_t | Send (const Message &message) |
| Send a message to the client. More... | |
| size_t | TrySend (const void *buffer, size_t size) |
| Try to send data to the client in non-blocking mode. More... | |
| size_t | TrySend (const std::string &text) |
| Try to send a text string to the client in non-blocking mode. More... | |
| size_t | TrySend (const Message &message) |
| Try to send a message to the client in non-blocking mode. More... | |
| size_t | Receive (Message &message) |
| Receive a message from the client. More... | |
| size_t | TryReceive (Message &message) |
| Try to receive a message from the client in non-blocking mode. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from CppServer::Nanomsg::Server | |
| virtual void | onThreadInitialize () |
| Initialize thread handler. More... | |
| virtual void | onThreadCleanup () |
| Cleanup thread handler. More... | |
| virtual void | onStarted () |
| Handle server started notification. More... | |
| virtual void | onStopped () |
| Handle server stopped notification. More... | |
| virtual void | onIdle () |
| Handle server idle notification. More... | |
| virtual void | onReceived (Message &message) |
| Handle message received notification. More... | |
| virtual void | onError (int error, const std::string &message) |
| Handle error notification. More... | |
Nanomsg push server.
Nanomsg push server is used to pull messages from the Nanomsg push clients.
This server is used to receive a message from a cluster of nodes. Send operation is not implemented on this server type.
Thread-safe.
Definition at line 27 of file push_server.h.
|
inlineexplicit |
Initialize server with a given endpoint address.
| address | - Endpoint address |
| threading | - Run the server in a separate thread (default is true) |
Definition at line 35 of file push_server.h.
|
delete |
|
default |
|
virtualdefault |
|
delete |
|
default |
1.8.14