#include <libmythbase/http/mythhttpsocket.h>
Definition at line 18 of file mythhttpsocket.h.
◆ MythHTTPSocket()
| MythHTTPSocket::MythHTTPSocket |
( |
qintptr |
Socket, |
|
|
bool |
SSL, |
|
|
MythHTTPConfig |
Config |
|
) |
| |
|
explicit |
◆ ~MythHTTPSocket()
| MythHTTPSocket::~MythHTTPSocket |
( |
| ) |
|
|
override |
◆ Disconnected
| void MythHTTPSocket::Disconnected |
( |
| ) |
|
|
protectedslot |
The socket was disconnected.
The QTcpSocket::disconnected signal is also connected to our QThread::quit slot, so the thread will be closed once the socket is disconnected.
Definition at line 145 of file mythhttpsocket.cpp.
Referenced by MythHTTPSocket().
◆ Error
| void MythHTTPSocket::Error |
( |
QAbstractSocket::SocketError |
Error | ) |
|
|
protectedslot |
◆ Finish
| void MythHTTPSocket::Finish |
( |
| ) |
|
|
signal |
◆ HandlersChanged
| void MythHTTPSocket::HandlersChanged |
( |
const HTTPHandlers & |
Handlers | ) |
|
|
slot |
◆ HostsChanged
| void MythHTTPSocket::HostsChanged |
( |
const QStringList & |
Hosts | ) |
|
|
slot |
◆ NewBinaryMessage
| void MythHTTPSocket::NewBinaryMessage |
( |
const DataPayloads & |
Payloads | ) |
|
|
staticslot |
◆ NewRawTextMessage
| void MythHTTPSocket::NewRawTextMessage |
( |
const DataPayloads & |
Payloads | ) |
|
|
slot |
◆ NewTextMessage
| void MythHTTPSocket::NewTextMessage |
( |
const StringPayload & |
Text | ) |
|
|
slot |
◆ OriginsChanged
| void MythHTTPSocket::OriginsChanged |
( |
const QStringList & |
Origins | ) |
|
|
slot |
Update the list of allowed Origins.
The initial list is passed in via the constructor and any changes are notified via this slot.
Definition at line 130 of file mythhttpsocket.cpp.
Referenced by MythHTTPThread::run().
◆ PathsChanged
| void MythHTTPSocket::PathsChanged |
( |
const QStringList & |
Paths | ) |
|
|
slot |
Update our list of recognised file paths.
The initial set of paths is passed in via the constructor. Any changes are notified using this slot.
Definition at line 109 of file mythhttpsocket.cpp.
Referenced by MythHTTPThread::run().
◆ Read
| void MythHTTPSocket::Read |
( |
| ) |
|
|
protectedslot |
◆ Respond()
| void MythHTTPSocket::Respond |
( |
const HTTPResponse & |
Response | ) |
|
Send response to client.
Queue headers, queue content, signal whether to close the socket and push first data to start the write.
Definition at line 358 of file mythhttpsocket.cpp.
Referenced by Read(), and Timeout().
◆ RespondDirect()
Send an (error) response directly without creating a thread.
This is used to send 503 Service Unavailable
Definition at line 418 of file mythhttpsocket.cpp.
◆ ServicesChanged
| void MythHTTPSocket::ServicesChanged |
( |
const HTTPServices & |
Services | ) |
|
|
slot |
◆ SetupWebSocket()
| void MythHTTPSocket::SetupWebSocket |
( |
| ) |
|
|
private |
◆ Stop
| void MythHTTPSocket::Stop |
( |
| ) |
|
|
protectedslot |
◆ ThreadUpgraded
| void MythHTTPSocket::ThreadUpgraded |
( |
QThread * |
Thread | ) |
|
|
signal |
◆ Timeout
| void MythHTTPSocket::Timeout |
( |
| ) |
|
|
protectedslot |
Close the socket after a period of inactivity.
This ensures we recycle unused threads for new connections.
Definition at line 160 of file mythhttpsocket.cpp.
Referenced by MythHTTPSocket().
◆ UpdateServices
| void MythHTTPSocket::UpdateServices |
( |
const HTTPServices & |
Services | ) |
|
|
signal |
◆ Write
| void MythHTTPSocket::Write |
( |
int64_t |
Written = 0 | ) |
|
|
protectedslot |
◆ m_activeServices
◆ m_config
◆ m_nextConnection
◆ m_parser
◆ m_peer
| QString MythHTTPSocket::m_peer |
|
private |
◆ m_protocol
◆ m_queue
◆ m_socket
| QTcpSocket* MythHTTPSocket::m_socket { nullptr } |
|
private |
◆ m_socketFD
| qintptr MythHTTPSocket::m_socketFD { 0 } |
|
private |
◆ m_stopping
| bool MythHTTPSocket::m_stopping { false } |
|
private |
◆ m_testSocket
| bool MythHTTPSocket::m_testSocket { false } |
|
private |
◆ m_timer
| QTimer MythHTTPSocket::m_timer |
|
private |
◆ m_totalSent
| int64_t MythHTTPSocket::m_totalSent { 0 } |
|
private |
◆ m_totalToSend
| int64_t MythHTTPSocket::m_totalToSend { 0 } |
|
private |
◆ m_totalWritten
| int64_t MythHTTPSocket::m_totalWritten { 0 } |
|
private |
◆ m_websocket
◆ m_websocketevent
◆ m_writeBuffer
| HTTPData MythHTTPSocket::m_writeBuffer { nullptr } |
|
private |
◆ m_writeTime
| QElapsedTimer MythHTTPSocket::m_writeTime |
|
private |
The documentation for this class was generated from the following files: