#include <twebsocketendpoint.h>
The TWebSocketEndpoint is the base class of endpoints for WebSocket communication.
◆ TWebSocketEndpoint()
TWebSocketEndpoint::TWebSocketEndpoint |
( |
| ) |
|
◆ ~TWebSocketEndpoint()
virtual TWebSocketEndpoint::~TWebSocketEndpoint |
( |
| ) |
|
|
inlinevirtual |
◆ className()
QString TWebSocketEndpoint::className |
( |
| ) |
const |
|
inline |
◆ close()
Disconnects the WebSocket's connection with the client, closes the socket.
◆ closeSocket()
Disconnects the WebSocket's connection of the id, closes the socket.
◆ disabledEndpoints()
const QStringList & TWebSocketEndpoint::disabledEndpoints |
( |
| ) |
|
|
static |
◆ identityKeyOfLoginUser()
QString TWebSocketEndpoint::identityKeyOfLoginUser |
( |
const TSession & |
session | ) |
|
|
static |
Returns the identity key of the user, TAbstractUser object, logged in.
◆ isUserLoggedIn()
bool TWebSocketEndpoint::isUserLoggedIn |
( |
const TSession & |
session | ) |
|
|
static |
Returns true if a user is logged in to the system; otherwise returns false.
◆ keepAliveInterval()
virtual int TWebSocketEndpoint::keepAliveInterval |
( |
| ) |
const |
|
inlineprotectedvirtual |
◆ name()
QString TWebSocketEndpoint::name |
( |
| ) |
const |
Returns the endpoint name.
◆ onBinaryReceived()
void TWebSocketEndpoint::onBinaryReceived |
( |
const QByteArray & |
binary | ) |
|
|
protectedvirtual |
This handler is called immediately after a binary message is received from the client.
◆ onClose()
void TWebSocketEndpoint::onClose |
( |
int |
closeCode | ) |
|
|
protectedvirtual |
This handler is called immediately when the WebSocket connection is closed.
◆ onOpen()
bool TWebSocketEndpoint::onOpen |
( |
const TSession & |
session | ) |
|
|
protectedvirtual |
This handler is called immediately after the WebSocket connection is open.
If it returns false then the connection will be closed.
◆ onPing()
void TWebSocketEndpoint::onPing |
( |
const QByteArray & |
payload | ) |
|
|
protectedvirtual |
This handler is called immediately after a Ping frame is received from the client.
◆ onPong()
void TWebSocketEndpoint::onPong |
( |
const QByteArray & |
payload | ) |
|
|
protectedvirtual |
This handler is called immediately after a Pong frame is received from the client.
◆ onTextReceived()
void TWebSocketEndpoint::onTextReceived |
( |
const QString & |
text | ) |
|
|
protectedvirtual |
This handler is called immediately after a text message is received from the client.
◆ peerAddress()
QHostAddress TWebSocketEndpoint::peerAddress |
( |
| ) |
const |
|
inline |
◆ peerPort()
uint16_t TWebSocketEndpoint::peerPort |
( |
| ) |
const |
|
inline |
◆ ping()
void TWebSocketEndpoint::ping |
( |
const QByteArray & |
payload = QByteArray() | ) |
|
Pings the client to indicate that the connection is still alive.
◆ publish() [1/2]
void TWebSocketEndpoint::publish |
( |
const QString & |
topic, |
|
|
const QByteArray & |
binary |
|
) |
| |
◆ publish() [2/2]
void TWebSocketEndpoint::publish |
( |
const QString & |
topic, |
|
|
const QString & |
text |
|
) |
| |
◆ reset()
void TWebSocketEndpoint::reset |
( |
| ) |
|
◆ rollbackTransaction()
void TWebSocketEndpoint::rollbackTransaction |
( |
| ) |
|
|
inline |
This function is called to rollback a transaction on the database.
◆ sendBinary() [1/2]
void TWebSocketEndpoint::sendBinary |
( |
const QByteArray & |
binary | ) |
|
Sends the given binary over the socket as a binary message.
◆ sendBinary() [2/2]
void TWebSocketEndpoint::sendBinary |
( |
int |
sid, |
|
|
const QByteArray & |
binary |
|
) |
| |
Sends the given binary over the socket of the id as a binary message.
◆ sendPing()
void TWebSocketEndpoint::sendPing |
( |
const QByteArray & |
payload = QByteArray() | ) |
|
Pings the client to indicate that the connection is still alive.
◆ sendPong()
void TWebSocketEndpoint::sendPong |
( |
const QByteArray & |
payload = QByteArray() | ) |
|
|
protected |
Sends a pong message.
Internal use.
◆ sendText() [1/2]
void TWebSocketEndpoint::sendText |
( |
const QString & |
text | ) |
|
Sends the given text over the socket as a text message.
◆ sendText() [2/2]
void TWebSocketEndpoint::sendText |
( |
int |
sid, |
|
|
const QString & |
text |
|
) |
| |
Sends the given text over the socket of the id as a text message.
◆ session() [1/2]
Returns the current WebSocket session, allows associating information with individual visitors.
◆ session() [2/2]
Returns the current WebSocket session, allows associating information with individual visitors.
◆ startKeepAlive()
void TWebSocketEndpoint::startKeepAlive |
( |
int |
interval | ) |
|
Starts pinging to this WebSocket.
When the interval time expires without communication, sends Ping frame over the connection to check that the link is operating.
◆ subscribe()
void TWebSocketEndpoint::subscribe |
( |
const QString & |
topic, |
|
|
bool |
local = true |
|
) |
| |
◆ transactionEnabled()
bool TWebSocketEndpoint::transactionEnabled |
( |
| ) |
const |
|
inlineprotectedvirtual |
Must be overridden by subclasses to disable transaction mechanism.
The function must return false to disable the mechanism. This function returns true.
◆ unsubscribe()
void TWebSocketEndpoint::unsubscribe |
( |
const QString & |
topic | ) |
|
◆ unsubscribeFromAll()
void TWebSocketEndpoint::unsubscribeFromAll |
( |
| ) |
|
◆ TWebSocketWorker
friend class TWebSocketWorker |
|
friend |
The documentation for this class was generated from the following files: