MythTV  master
Public Slots | Public Member Functions | Private Attributes | List of all members
MythHTTPThreadPool Class Reference

#include <mythhttpthreadpool.h>

Inheritance diagram for MythHTTPThreadPool:
Inheritance graph
[legend]
Collaboration diagram for MythHTTPThreadPool:
Collaboration graph
[legend]

Public Slots

void ThreadFinished ()
 
void ThreadUpgraded (QThread *Thread)
 

Public Member Functions

 MythHTTPThreadPool ()
 
 ~MythHTTPThreadPool () override
 
size_t AvailableThreads () const
 
size_t MaxThreads () const
 
size_t ThreadCount () const
 
void AddThread (MythHTTPThread *Thread)
 
- Public Member Functions inherited from ServerPool
 ServerPool (QObject *parent=nullptr)
 
 ~ServerPool (void) override
 
bool listen (QList< QHostAddress > addrs, quint16 port, bool requireall=true, PoolServerType type=kTCPServer)
 
bool listen (QStringList addrs, quint16 port, bool requireall=true, PoolServerType type=kTCPServer)
 
bool listen (quint16 port, bool requireall=true, PoolServerType type=kTCPServer)
 
bool bind (QList< QHostAddress > addrs, quint16 port, bool requireall=true)
 
bool bind (QStringList addrs, quint16 port, bool requireall=true)
 
bool bind (quint16 port, bool requireall=true)
 
qint64 writeDatagram (const char *data, qint64 size, const QHostAddress &addr, quint16 port)
 
qint64 writeDatagram (const QByteArray &datagram, const QHostAddress &addr, quint16 port)
 
bool isListening (void) const
 
int maxPendingConnections (void) const
 
void setMaxPendingConnections (int n)
 
quint16 serverPort (void) const
 
QNetworkProxy proxy (void)
 
void setProxy (const QNetworkProxy &proxy)
 
void close (void)
 
int tryListeningPort (int baseport, int range=1)
 tryListeningPort More...
 
int tryBindingPort (int baseport, int range=1)
 tryBindingPort More...
 

Private Attributes

size_t m_maxThreads { 4 }
 
std::list< MythHTTPThread * > m_threads
 
std::list< MythHTTPThread * > m_upgradedThreads
 

Additional Inherited Members

- Signals inherited from ServerPool
void newConnection (QTcpSocket *)
 
void newDatagram (QByteArray, QHostAddress, quint16)
 
- Static Public Member Functions inherited from ServerPool
static void RefreshDefaultListen (void)
 
static QList< QHostAddress > DefaultListen (void)
 
static QList< QHostAddress > DefaultListenIPv4 (void)
 
static QList< QHostAddress > DefaultListenIPv6 (void)
 
static QList< QHostAddress > DefaultBroadcast (void)
 
static QList< QHostAddress > DefaultBroadcastIPv4 (void)
 
static QList< QHostAddress > DefaultBroadcastIPv6 (void)
 
static int tryListeningPort (QTcpServer *server, int baseport, int range=1, bool *isipv6=nullptr)
 tryListeningPort More...
 
static int tryBindingPort (QUdpSocket *socket, int baseport, int range=1, bool *isipv6=nullptr)
 tryBindingPort More...
 
- Protected Slots inherited from ServerPool
virtual void newUdpDatagram (void)
 
virtual void newTcpConnection (qintptr socket)
 

Detailed Description

Definition at line 9 of file mythhttpthreadpool.h.

Constructor & Destructor Documentation

◆ MythHTTPThreadPool()

MythHTTPThreadPool::MythHTTPThreadPool ( )

Definition at line 8 of file mythhttpthreadpool.cpp.

◆ ~MythHTTPThreadPool()

MythHTTPThreadPool::~MythHTTPThreadPool ( )
override

Definition at line 19 of file mythhttpthreadpool.cpp.

Member Function Documentation

◆ AvailableThreads()

size_t MythHTTPThreadPool::AvailableThreads ( ) const

Definition at line 29 of file mythhttpthreadpool.cpp.

Referenced by MythHTTPServer::ProcessTCPQueueHandler().

◆ MaxThreads()

size_t MythHTTPThreadPool::MaxThreads ( ) const

Definition at line 36 of file mythhttpthreadpool.cpp.

Referenced by MythHTTPServer::ProcessTCPQueueHandler().

◆ ThreadCount()

size_t MythHTTPThreadPool::ThreadCount ( ) const

Definition at line 41 of file mythhttpthreadpool.cpp.

◆ AddThread()

void MythHTTPThreadPool::AddThread ( MythHTTPThread Thread)

Definition at line 46 of file mythhttpthreadpool.cpp.

Referenced by MythHTTPServer::ProcessTCPQueueHandler().

◆ ThreadFinished

void MythHTTPThreadPool::ThreadFinished ( )
slot

Definition at line 52 of file mythhttpthreadpool.cpp.

Referenced by MythHTTPServer::ProcessTCPQueueHandler().

◆ ThreadUpgraded

void MythHTTPThreadPool::ThreadUpgraded ( QThread *  Thread)
slot

Definition at line 74 of file mythhttpthreadpool.cpp.

Referenced by MythHTTPThread::run().

Member Data Documentation

◆ m_maxThreads

size_t MythHTTPThreadPool::m_maxThreads { 4 }
private

◆ m_threads

std::list<MythHTTPThread*> MythHTTPThreadPool::m_threads
private

◆ m_upgradedThreads

std::list<MythHTTPThread*> MythHTTPThreadPool::m_upgradedThreads
private

Definition at line 30 of file mythhttpthreadpool.h.

Referenced by AvailableThreads(), ThreadFinished(), and ThreadUpgraded().


The documentation for this class was generated from the following files: