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