SNode.C
|
#include <SocketContextUpgrade.h>
Public Types | |
using | SubProtocol = SubProtocolT |
using | Request = RequestT |
using | Response = ResponseT |
Public Types inherited from web::websocket::SubProtocolContext | |
enum | OpCode { CONTINUATION = 0x00 , TEXT = 0x01 , BINARY = 0x02 , CLOSE = 0x08 , PING = 0x09 , PONG = 0x0A } |
Protected Types | |
enum class | Role { SERVER , CLIENT } |
Protected Types inherited from web::http::SocketContextUpgrade< RequestT, ResponseT > | |
using | Request = RequestT |
using | Response = ResponseT |
using | SocketContextUpgradeFactory = web::http::SocketContextUpgradeFactory<Request, Response> |
Protected Attributes | |
SubProtocol * | subProtocol = nullptr |
Protected Attributes inherited from web::websocket::Transmitter | |
bool | closeSent = false |
Private Types | |
using | Super = web::http::SocketContextUpgrade<RequestT, ResponseT> |
Private Member Functions | |
void | sendMessage (uint8_t opCode, const char *message, std::size_t messageLength) override |
void | sendMessageStart (uint8_t opCode, const char *message, std::size_t messageLength) override |
void | sendMessageFrame (const char *message, std::size_t messageLength) override |
void | sendMessageEnd (const char *message, std::size_t messageLength) override |
void | sendPing (const char *reason=nullptr, std::size_t reasonLength=0) override |
void | sendPong (const char *reason=nullptr, std::size_t reasonLength=0) override |
void | sendClose (uint16_t statusCode=1000, const char *reason=nullptr, std::size_t reasonLength=0) override |
void | sendClose (const char *message, std::size_t messageLength) override |
core::socket::stream::SocketConnection * | getSocketConnection () override |
void | onMessageStart (int opCode) override |
void | onMessageData (const char *chunk, uint64_t chunkLen) override |
void | onMessageEnd () override |
void | onMessageError (uint16_t errnum) override |
void | onConnected () override |
void | onDisconnected () override |
bool | onSignal (int sig) override |
std::size_t | onReceivedFromPeer () override |
Private Attributes | |
int | receivedOpCode = 0 |
std::string | pongCloseData |
Definition at line 31 of file SubProtocol.h.
using web::websocket::SocketContextUpgrade< SubProtocolT, RequestT, ResponseT >::Request = RequestT |
Definition at line 69 of file SocketContextUpgrade.h.
using web::websocket::SocketContextUpgrade< SubProtocolT, RequestT, ResponseT >::Response = ResponseT |
Definition at line 70 of file SocketContextUpgrade.h.
using web::websocket::SocketContextUpgrade< SubProtocolT, RequestT, ResponseT >::SubProtocol = SubProtocolT |
Definition at line 68 of file SocketContextUpgrade.h.
|
private |
Definition at line 65 of file SocketContextUpgrade.h.
|
strongprotected |
Enumerator | |
---|---|
SERVER | |
CLIENT |
Definition at line 79 of file SocketContextUpgrade.h.
|
delete |
|
delete |
|
protected |
Definition at line 32 of file SocketContextUpgrade.hpp.
|
overridedefault |
|
overrideprivatevirtual |
Implements web::websocket::SubProtocolContext.
Definition at line 102 of file SocketContextUpgrade.hpp.
|
overrideprivatevirtual |
Implements core::socket::stream::SocketContext.
Definition at line 180 of file SocketContextUpgrade.hpp.
References web::websocket::SocketContextUpgrade< SubProtocolT, RequestT, ResponseT >::subProtocol.
|
overrideprivatevirtual |
Implements core::socket::stream::SocketContext.
Definition at line 186 of file SocketContextUpgrade.hpp.
References web::websocket::SocketContextUpgrade< SubProtocolT, RequestT, ResponseT >::subProtocol.
|
overrideprivatevirtual |
Implements web::websocket::Receiver.
Definition at line 124 of file SocketContextUpgrade.hpp.
References web::websocket::SocketContextUpgrade< SubProtocolT, RequestT, ResponseT >::receivedOpCode.
|
overrideprivatevirtual |
Implements web::websocket::Receiver.
Definition at line 147 of file SocketContextUpgrade.hpp.
References web::websocket::SocketContextUpgrade< SubProtocolT, RequestT, ResponseT >::receivedOpCode, and web::websocket::SocketContextUpgrade< SubProtocolT, RequestT, ResponseT >::subProtocol.
|
overrideprivatevirtual |
Implements web::websocket::Receiver.
Definition at line 174 of file SocketContextUpgrade.hpp.
References web::websocket::SocketContextUpgrade< SubProtocolT, RequestT, ResponseT >::subProtocol.
|
overrideprivatevirtual |
Implements web::websocket::Receiver.
Definition at line 107 of file SocketContextUpgrade.hpp.
|
overrideprivatevirtual |
Implements core::socket::SocketContext.
Definition at line 197 of file SocketContextUpgrade.hpp.
|
overrideprivatevirtual |
Implements core::socket::SocketContext.
Definition at line 192 of file SocketContextUpgrade.hpp.
References web::websocket::SocketContextUpgrade< SubProtocolT, RequestT, ResponseT >::subProtocol.
|
delete |
|
overrideprivatevirtual |
Implements web::websocket::SubProtocolContext.
Definition at line 89 of file SocketContextUpgrade.hpp.
|
overrideprivatevirtual |
Implements web::websocket::SubProtocolContext.
Definition at line 73 of file SocketContextUpgrade.hpp.
|
overrideprivatevirtual |
Implements web::websocket::SubProtocolContext.
Definition at line 41 of file SocketContextUpgrade.hpp.
|
overrideprivatevirtual |
Implements web::websocket::SubProtocolContext.
Definition at line 57 of file SocketContextUpgrade.hpp.
|
overrideprivatevirtual |
Implements web::websocket::SubProtocolContext.
Definition at line 52 of file SocketContextUpgrade.hpp.
|
overrideprivatevirtual |
Implements web::websocket::SubProtocolContext.
Definition at line 47 of file SocketContextUpgrade.hpp.
|
overrideprivatevirtual |
Implements web::websocket::SubProtocolContext.
Definition at line 62 of file SocketContextUpgrade.hpp.
|
overrideprivatevirtual |
Implements web::websocket::SubProtocolContext.
Definition at line 67 of file SocketContextUpgrade.hpp.
|
private |
Definition at line 121 of file SocketContextUpgrade.h.
|
private |
Definition at line 119 of file SocketContextUpgrade.h.
Referenced by web::websocket::SocketContextUpgrade< SubProtocolT, RequestT, ResponseT >::onMessageData(), and web::websocket::SocketContextUpgrade< SubProtocolT, RequestT, ResponseT >::onMessageEnd().
|
protected |
Definition at line 116 of file SocketContextUpgrade.h.
Referenced by web::websocket::SocketContextUpgrade< SubProtocolT, RequestT, ResponseT >::onConnected(), web::websocket::SocketContextUpgrade< SubProtocolT, RequestT, ResponseT >::onDisconnected(), web::websocket::SocketContextUpgrade< SubProtocolT, RequestT, ResponseT >::onMessageEnd(), web::websocket::SocketContextUpgrade< SubProtocolT, RequestT, ResponseT >::onMessageError(), web::websocket::SocketContextUpgrade< SubProtocol, web::http::client::Request, web::http::client::Response >::onReceivedFromPeer(), and web::websocket::SocketContextUpgrade< SubProtocolT, RequestT, ResponseT >::onSignal().