1#ifndef MYTHHTTPSOCKET_H
2#define MYTHHTTPSOCKET_H
6#include <QAbstractSocket>
7#include <QElapsedTimer>
48 void Write(int64_t Written = 0);
49 void Error(QAbstractSocket::SocketError
Error);
QElapsedTimer m_writeTime
void Write(int64_t Written=0)
void NewRawTextMessage(const DataPayloads &Payloads)
void NewTextMessage(const StringPayload &Text)
~MythHTTPSocket() override
static void RespondDirect(qintptr Socket, const HTTPResponse &Response, const MythHTTPConfig &Config)
Send an (error) response directly without creating a thread.
void Respond(const HTTPResponse &Response)
Send response to client.
void ThreadUpgraded(QThread *Thread)
void Disconnected()
The socket was disconnected.
void Timeout()
Close the socket after a period of inactivity.
void Stop()
Close the socket and quit the thread.
void PathsChanged(const QStringList &Paths)
Update our list of recognised file paths.
static void NewBinaryMessage(const DataPayloads &Payloads)
HTTPServicePtrs m_activeServices
void UpdateServices(const HTTPServices &Services)
void HandlersChanged(const HTTPHandlers &Handlers)
void OriginsChanged(const QStringList &Origins)
Update the list of allowed Origins.
void Read()
Read data from the socket which is parsed by MythHTTPParser.
MythHTTPConnection m_nextConnection
MythWebSocket * m_websocket
MythWebSocketEvent * m_websocketevent
void Error(QAbstractSocket::SocketError Error)
MythHTTPSocket(qintptr Socket, bool SSL, MythHTTPConfig Config)
void ServicesChanged(const HTTPServices &Services)
void SetupWebSocket()
Transition socket to a WebSocket.
void HostsChanged(const QStringList &Hosts)
MythSocketProtocol m_protocol
An implementation of the WebSocket protocol...
std::vector< DataPayload > DataPayloads
std::shared_ptr< MythSharedString > StringPayload
std::vector< HTTPHandler > HTTPHandlers
std::shared_ptr< MythHTTPResponse > HTTPResponse
std::shared_ptr< MythHTTPData > HTTPData
std::vector< HTTPService > HTTPServices
std::vector< HTTPServicePtr > HTTPServicePtrs
std::deque< HTTPVariant > HTTPQueue