SNode.C
|
#include <SubProtocol.h>
Public Member Functions | |
~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 |
Protected Member Functions | |
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) | |
Private Types | |
using | Super = web::websocket::SubProtocol<web::websocket::server::SocketContextUpgrade> |
Private Attributes | |
std::string | group |
Friends | |
template<typename RequestT , typename ResponseT , typename SubProtocolT > | |
class | web::websocket::SocketContextUpgrade |
class | GroupsManager |
Additional Inherited Members | |
Protected Attributes inherited from web::websocket::SubProtocol< web::websocket::server::SocketContextUpgrade > | |
SubProtocolContext * | subProtocolContext |
Definition at line 41 of file SubProtocol.h.
|
private |
Definition at line 43 of file SubProtocol.h.
|
protected |
Definition at line 31 of file SubProtocol.cpp.
|
overridevirtual |
Reimplemented from web::websocket::SubProtocol< web::websocket::server::SocketContextUpgrade >.
Definition at line 36 of file SubProtocol.cpp.
void web::websocket::server::SubProtocol::forEachClient | ( | const std::function< void(const SubProtocol *)> & | sendToClient, |
bool | excludeSelf = false ) |
Definition at line 79 of file SubProtocol.cpp.
void web::websocket::server::SubProtocol::sendBroadcast | ( | const char * | message, |
std::size_t | messageLength, | ||
bool | excludeSelf = false ) |
Definition at line 51 of file SubProtocol.cpp.
void web::websocket::server::SubProtocol::sendBroadcast | ( | const std::string & | message, |
bool | excludeSelf = false ) |
Definition at line 47 of file SubProtocol.cpp.
void web::websocket::server::SubProtocol::sendBroadcastEnd | ( | const char * | message, |
std::size_t | messageLength, | ||
bool | excludeSelf = false ) |
Definition at line 71 of file SubProtocol.cpp.
void web::websocket::server::SubProtocol::sendBroadcastEnd | ( | const std::string & | message, |
bool | excludeSelf = false ) |
Definition at line 75 of file SubProtocol.cpp.
void web::websocket::server::SubProtocol::sendBroadcastFrame | ( | const char * | message, |
std::size_t | messageLength, | ||
bool | excludeSelf = false ) |
Definition at line 63 of file SubProtocol.cpp.
void web::websocket::server::SubProtocol::sendBroadcastFrame | ( | const std::string & | message, |
bool | excludeSelf = false ) |
Definition at line 67 of file SubProtocol.cpp.
void web::websocket::server::SubProtocol::sendBroadcastStart | ( | const char * | message, |
std::size_t | messageLength, | ||
bool | excludeSelf = false ) |
Definition at line 55 of file SubProtocol.cpp.
void web::websocket::server::SubProtocol::sendBroadcastStart | ( | const std::string & | message, |
bool | excludeSelf = false ) |
Definition at line 59 of file SubProtocol.cpp.
void web::websocket::server::SubProtocol::subscribe | ( | const std::string & | group | ) |
Definition at line 40 of file SubProtocol.cpp.
|
friend |
Definition at line 82 of file SubProtocol.h.
|
friend |
Definition at line 80 of file SubProtocol.h.
|
private |
Definition at line 77 of file SubProtocol.h.
Referenced by web::websocket::server::GroupsManager::subscribe().