Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
CWebSocket Class Referenceabstract

#include <WebSocket.h>

Inheritance diagram for CWebSocket:
CWebSocketV8 CWebSocketV13

Public Member Functions

 CWebSocket ()
 
virtual ~CWebSocket ()
 
int GetVersion ()
 
WebSocketState GetState ()
 
virtual bool Handshake (const char *data, size_t length, std::string &response)=0
 
virtual const CWebSocketMessageHandle (const char *&buffer, size_t &length, bool &send)
 
virtual const CWebSocketMessageSend (WebSocketFrameOpcode opcode, const char *data=NULL, uint32_t length=0)
 
virtual const CWebSocketFramePing (const char *data=NULL) const =0
 
virtual const CWebSocketFramePong (const char *data, uint32_t length) const =0
 
virtual const CWebSocketFrameClose (WebSocketCloseReason reason=WebSocketCloseNormal, const std::string &message="")=0
 
virtual void Fail ()=0
 

Protected Member Functions

virtual CWebSocketFrameGetFrame (const char *data, uint64_t length)=0
 
virtual CWebSocketFrameGetFrame (WebSocketFrameOpcode opcode, const char *data=NULL, uint32_t length=0, bool final=true, bool masked=false, int32_t mask=0, int8_t extension=0)=0
 
virtual CWebSocketMessageGetMessage ()=0
 

Protected Attributes

int m_version
 
WebSocketState m_state
 
CWebSocketMessagem_message
 

Constructor & Destructor Documentation

◆ CWebSocket()

CWebSocket::CWebSocket ( )
inline

◆ ~CWebSocket()

virtual CWebSocket::~CWebSocket ( )
inlinevirtual

Member Function Documentation

◆ Close()

virtual const CWebSocketFrame * CWebSocket::Close ( WebSocketCloseReason reason = WebSocketCloseNormal,
const std::string & message = "" )
pure virtual

Implemented in CWebSocketV13, and CWebSocketV8.

◆ Fail()

virtual void CWebSocket::Fail ( )
pure virtual

Implemented in CWebSocketV8.

◆ GetFrame() [1/2]

virtual CWebSocketFrame * CWebSocket::GetFrame ( const char * data,
uint64_t length )
protectedpure virtual

Implemented in CWebSocketV8.

◆ GetFrame() [2/2]

virtual CWebSocketFrame * CWebSocket::GetFrame ( WebSocketFrameOpcode opcode,
const char * data = NULL,
uint32_t length = 0,
bool final = true,
bool masked = false,
int32_t mask = 0,
int8_t extension = 0 )
protectedpure virtual

Implemented in CWebSocketV8.

◆ GetMessage()

virtual CWebSocketMessage * CWebSocket::GetMessage ( )
protectedpure virtual

Implemented in CWebSocketV8.

◆ GetState()

WebSocketState CWebSocket::GetState ( )
inline

◆ GetVersion()

int CWebSocket::GetVersion ( )
inline

◆ Handle()

const CWebSocketMessage * CWebSocket::Handle ( const char *& buffer,
size_t & length,
bool & send )
virtual

◆ Handshake()

virtual bool CWebSocket::Handshake ( const char * data,
size_t length,
std::string & response )
pure virtual

Implemented in CWebSocketV13, and CWebSocketV8.

◆ Ping()

virtual const CWebSocketFrame * CWebSocket::Ping ( const char * data = NULL) const
pure virtual

Implemented in CWebSocketV8.

◆ Pong()

virtual const CWebSocketFrame * CWebSocket::Pong ( const char * data,
uint32_t length ) const
pure virtual

Implemented in CWebSocketV8.

◆ Send()

const CWebSocketMessage * CWebSocket::Send ( WebSocketFrameOpcode opcode,
const char * data = NULL,
uint32_t length = 0 )
virtual

Member Data Documentation

◆ m_message

CWebSocketMessage* CWebSocket::m_message
protected

◆ m_state

WebSocketState CWebSocket::m_state
protected

◆ m_version

int CWebSocket::m_version
protected

The documentation for this class was generated from the following files: