|
SNode.C
|
#include <Echo.h>
Public Member Functions | |
| Echo (web::websocket::SubProtocolContext *socketContextUpgradeBase, const std::string &name) | |
Public Member Functions inherited from web::websocket::server::SubProtocol | |
| ~SubProtocol () override | |
| void | subscribe (const std::string &group) |
| void | sendBroadcast (const char *message, std::size_t messageLength, bool excludeSelf=false) |
| void | sendBroadcast (const std::string &message, bool excludeSelf=false) |
| void | sendBroadcastStart (const char *message, std::size_t messageLength, bool excludeSelf=false) |
| void | sendBroadcastStart (const std::string &message, bool excludeSelf=false) |
| void | sendBroadcastFrame (const char *message, std::size_t messageLength, bool excludeSelf=false) |
| void | sendBroadcastFrame (const std::string &message, bool excludeSelf=false) |
| void | sendBroadcastEnd (const char *message, std::size_t messageLength, bool excludeSelf=false) |
| void | sendBroadcastEnd (const std::string &message, bool excludeSelf=false) |
| void | forEachClient (const std::function< void(const SubProtocol *)> &sendToClient, bool excludeSelf=false) |
Public Member Functions inherited from web::websocket::SubProtocol< web::websocket::server::SocketContextUpgrade > | |
| SubProtocol (SubProtocol &)=delete | |
| SubProtocol (SubProtocol &&)=delete | |
| SubProtocol & | operator= (SubProtocol &)=delete |
| SubProtocol & | operator= (SubProtocol &&)=delete |
| void | sendMessage (const char *message, std::size_t messageLength) const |
| void | sendMessage (const std::string &message) const |
| void | sendMessageStart (const char *message, std::size_t messageLength) const |
| void | sendMessageStart (const std::string &message) const |
| void | sendMessageFrame (const char *message, std::size_t messageLength) const |
| void | sendMessageFrame (const std::string &message) const |
| void | sendMessageEnd (const char *message, std::size_t messageLength) const |
| void | sendMessageEnd (const std::string &message) const |
| void | sendPing (const char *reason=nullptr, std::size_t reasonLength=0) const |
| void | sendClose (uint16_t statusCode=1000, const char *reason=nullptr, std::size_t reasonLength=0) |
| const std::string & | getName () |
| core::socket::stream::SocketConnection * | getSocketConnection () const |
| std::size_t | getPayloadTotalSent () const |
| std::size_t | getPayloadTotalRead () const |
| std::string | getOnlineSince () const |
| std::string | getOnlineDuration () const |
Private Member Functions | |
| void | onConnected () override |
| void | onMessageStart (int opCode) override |
| void | onMessageData (const char *chunk, std::size_t chunkLen) override |
| void | onMessageEnd () override |
| void | onMessageError (uint16_t errnum) override |
| void | onDisconnected () override |
| bool | onSignal (int sig) override |
Private Attributes | |
| std::string | data |
Additional Inherited Members | |
Protected Member Functions inherited from web::websocket::server::SubProtocol | |
| SubProtocol (SubProtocolContext *subProtocolContext, const std::string &name, int pingInterval=0, int maxFlyingPings=3) | |
Protected Member Functions inherited from web::websocket::SubProtocol< web::websocket::server::SocketContextUpgrade > | |
| SubProtocol (SubProtocolContext *subProtocolContext, const std::string &name, int pingInterval=60, int maxFlyingPings=3) | |
Protected Attributes inherited from web::websocket::SubProtocol< web::websocket::server::SocketContextUpgrade > | |
| SubProtocolContext * | subProtocolContext |
| apps::websocket::subprotocol::echo::server::Echo::Echo | ( | web::websocket::SubProtocolContext * | socketContextUpgradeBase, |
| const std::string & | name | ||
| ) |
Definition at line 58 of file Echo.cpp.
References web::websocket::server::SubProtocol::SubProtocol().
Referenced by apps::websocket::subprotocol::echo::server::EchoFactory::create().
|
overrideprivatevirtual |
Implements web::websocket::SubProtocol< web::websocket::server::SocketContextUpgrade >.
Definition at line 62 of file Echo.cpp.
|
overrideprivatevirtual |
Implements web::websocket::SubProtocol< web::websocket::server::SocketContextUpgrade >.
Definition at line 93 of file Echo.cpp.
|
overrideprivatevirtual |
Implements web::websocket::SubProtocol< web::websocket::server::SocketContextUpgrade >.
Definition at line 70 of file Echo.cpp.
References data.
|
overrideprivatevirtual |
Implements web::websocket::SubProtocol< web::websocket::server::SocketContextUpgrade >.
Definition at line 76 of file Echo.cpp.
References data, and web::websocket::server::SubProtocol::sendBroadcast().
|
overrideprivatevirtual |
Implements web::websocket::SubProtocol< web::websocket::server::SocketContextUpgrade >.
Definition at line 89 of file Echo.cpp.
|
overrideprivatevirtual |
Implements web::websocket::SubProtocol< web::websocket::server::SocketContextUpgrade >.
Definition at line 66 of file Echo.cpp.
|
overrideprivatevirtual |
Implements web::websocket::SubProtocol< web::websocket::server::SocketContextUpgrade >.
Definition at line 97 of file Echo.cpp.
References web::websocket::SubProtocol< SocketContextUpgradeT >::sendClose(), and utils::system::sigabbrev_np().
|
private |
Definition at line 74 of file Echo.h.
Referenced by onMessageData(), and onMessageEnd().