#include <WebSocket.h>
§ WebSocket()
BaseLib::WebSocket::WebSocket |
( |
| ) |
|
§ ~WebSocket()
virtual BaseLib::WebSocket::~WebSocket |
( |
| ) |
|
|
inlinevirtual |
§ dataProcessingStarted()
bool BaseLib::WebSocket::dataProcessingStarted |
( |
| ) |
|
|
inline |
§ encode()
void BaseLib::WebSocket::encode |
( |
const std::vector< char > & |
data, |
|
|
Header::Opcode::Enum |
messageType, |
|
|
std::vector< char > & |
output |
|
) |
| |
|
static |
Encodes a WebSocket packet.
- Parameters
-
[in] | data | The data to encode |
[in] | messageType | The message type of the packet. |
[out] | output | The WebSocket packet |
§ encodeClose()
void BaseLib::WebSocket::encodeClose |
( |
std::vector< char > & |
output | ) |
|
|
static |
Encodes a WebSocket "close" packet.
- Parameters
-
§ getContent()
std::vector<char>& BaseLib::WebSocket::getContent |
( |
| ) |
|
|
inline |
§ getContentSize()
uint32_t BaseLib::WebSocket::getContentSize |
( |
| ) |
|
|
inline |
§ getHeader()
Header& BaseLib::WebSocket::getHeader |
( |
| ) |
|
|
inline |
§ isFinished()
bool BaseLib::WebSocket::isFinished |
( |
| ) |
|
|
inline |
§ process()
uint32_t BaseLib::WebSocket::process |
( |
char * |
buffer, |
|
|
int32_t |
bufferLength |
|
) |
| |
Parses WebSocket data from a buffer.
- Parameters
-
buffer | The buffer to parse |
bufferLength | The size of the buffer |
- Returns
- Returns the number of actually processed bytes
§ reset()
void BaseLib::WebSocket::reset |
( |
| ) |
|
§ setFinished()
void BaseLib::WebSocket::setFinished |
( |
| ) |
|
This method sets _finished and terminates _content with a null character.
Use it, when the header does not contain "Content-Length".
- See also
- isFinished()
-
_finished
The documentation for this class was generated from the following files: