|
MythTV
0.26-pre
|
#include <bufferedsocketdevice.h>
Public Member Functions | |
| BufferedSocketDevice (int nSocket) | |
| BufferedSocketDevice (MSocketDevice *pSocket=NULL, bool bTakeOwnership=false) | |
| virtual | ~BufferedSocketDevice () |
| MSocketDevice * | SocketDevice () |
| void | SetSocketDevice (MSocketDevice *pSocket) |
| void | SetDestAddress (QHostAddress hostAddress, quint16 nPort) |
| bool | Connect (const QHostAddress &addr, quint16 port) |
| void | Close () |
| void | Flush () |
| qint64 | Size () |
| qint64 | At () const |
| bool | At (qlonglong) |
| bool | AtEnd () |
| qulonglong | BytesAvailable () |
| qulonglong | WaitForMore (int msecs, bool *timeout=NULL) |
| qulonglong | BytesToWrite () const |
| void | ClearPendingData () |
| void | ClearReadBuffer () |
| qlonglong | ReadBlock (char *data, qulonglong maxlen) |
| qlonglong | WriteBlock (const char *data, qulonglong len) |
| qlonglong | WriteBlockDirect (const char *data, qulonglong len) |
| int | Getch () |
| int | Putch (int) |
| int | Ungetch (int) |
| bool | CanReadLine () |
| QString | ReadLine () |
| QString | ReadLine (int msecs) |
| qlonglong | ReadLine (char *data, qulonglong maxlen) |
| quint16 | Port () const |
| quint16 | PeerPort () const |
| QHostAddress | Address () const |
| QHostAddress | PeerAddress () const |
| void | SetReadBufferSize (qulonglong) |
| qulonglong | ReadBufferSize () const |
| bool | IsValid () |
| int | socket () |
Protected Member Functions | |
| int | ReadBytes () |
| bool | ConsumeWriteBuf (qulonglong nbytes) |
Protected Attributes | |
| MSocketDevice * | m_pSocket |
| qulonglong | m_nMaxReadBufferSize |
| qint64 | m_nWriteSize |
| write total buf size | |
| qint64 | m_nWriteIndex |
| write index | |
| bool | m_bHandleSocketDelete |
| QHostAddress | m_DestHostAddress |
| quint16 | m_nDestPort |
| MMembuf | m_bufRead |
| deque< QByteArray * > | m_bufWrite |
Definition at line 38 of file bufferedsocketdevice.h.
| BufferedSocketDevice::BufferedSocketDevice | ( | int | nSocket | ) |
Definition at line 24 of file bufferedsocketdevice.cpp.
| BufferedSocketDevice::BufferedSocketDevice | ( | MSocketDevice * | pSocket = NULL, |
| bool | bTakeOwnership = false |
||
| ) | [explicit] |
Definition at line 50 of file bufferedsocketdevice.cpp.
| BufferedSocketDevice::~BufferedSocketDevice | ( | ) | [virtual] |
Definition at line 68 of file bufferedsocketdevice.cpp.
| int BufferedSocketDevice::ReadBytes | ( | ) | [protected] |
Definition at line 166 of file bufferedsocketdevice.cpp.
Referenced by At(), AtEnd(), BytesAvailable(), CanReadLine(), Close(), Getch(), ReadBlock(), and ReadLine().
| bool BufferedSocketDevice::ConsumeWriteBuf | ( | qulonglong | nbytes | ) | [protected] |
Definition at line 220 of file bufferedsocketdevice.cpp.
Referenced by Flush().
Definition at line 114 of file bufferedsocketdevice.cpp.
Referenced by BufferedSocketDeviceRequest::GetHostAddress(), BufferedSocketDeviceRequest::GetPeerAddress(), BufferedSocketDeviceRequest::IsBlocking(), HttpWorker::run(), and BufferedSocketDeviceRequest::SetBlocking().
| void BufferedSocketDevice::SetSocketDevice | ( | MSocketDevice * | pSocket | ) |
Definition at line 123 of file bufferedsocketdevice.cpp.
| void BufferedSocketDevice::SetDestAddress | ( | QHostAddress | hostAddress, |
| quint16 | nPort | ||
| ) |
Definition at line 137 of file bufferedsocketdevice.cpp.
| bool BufferedSocketDevice::Connect | ( | const QHostAddress & | addr, |
| quint16 | port | ||
| ) |
Definition at line 102 of file bufferedsocketdevice.cpp.
Referenced by UPnpEventTask::Execute(), UPNPSubscription::SendSubscribeRequest(), and UPNPSubscription::SendUnsubscribeRequest().
Definition at line 77 of file bufferedsocketdevice.cpp.
Referenced by UPnpEventTask::Execute(), HttpWorker::run(), UPNPSubscription::SendSubscribeRequest(), UPNPSubscription::SendUnsubscribeRequest(), and ~BufferedSocketDevice().
Definition at line 256 of file bufferedsocketdevice.cpp.
Referenced by Close(), WriteBlock(), and WriteBlockDirect().
| qlonglong BufferedSocketDevice::Size | ( | void | ) |
Definition at line 324 of file bufferedsocketdevice.cpp.
| qlonglong BufferedSocketDevice::At | ( | ) | const |
Definition at line 333 of file bufferedsocketdevice.cpp.
Referenced by ReadLine().
| bool BufferedSocketDevice::At | ( | qlonglong | index | ) |
Definition at line 342 of file bufferedsocketdevice.cpp.
Definition at line 359 of file bufferedsocketdevice.cpp.
| qulonglong BufferedSocketDevice::BytesAvailable | ( | void | ) |
Definition at line 374 of file bufferedsocketdevice.cpp.
Referenced by BufferedSocketDeviceRequest::BytesAvailable(), CanReadLine(), Size(), and WaitForMore().
| qulonglong BufferedSocketDevice::WaitForMore | ( | int | msecs, |
| bool * | timeout = NULL |
||
| ) |
Definition at line 386 of file bufferedsocketdevice.cpp.
Referenced by BufferedSocketDeviceRequest::ReadBlock(), ReadLine(), HttpWorker::run(), and BufferedSocketDeviceRequest::WaitForMore().
| qulonglong BufferedSocketDevice::BytesToWrite | ( | void | ) | const |
Definition at line 437 of file bufferedsocketdevice.cpp.
Definition at line 447 of file bufferedsocketdevice.cpp.
Referenced by Close().
Definition at line 461 of file bufferedsocketdevice.cpp.
| qlonglong BufferedSocketDevice::ReadBlock | ( | char * | data, |
| qulonglong | maxlen | ||
| ) |
Definition at line 470 of file bufferedsocketdevice.cpp.
Referenced by BufferedSocketDeviceRequest::ReadBlock().
| qlonglong BufferedSocketDevice::WriteBlock | ( | const char * | data, |
| qulonglong | len | ||
| ) |
Definition at line 493 of file bufferedsocketdevice.cpp.
Referenced by Putch(), and BufferedSocketDeviceRequest::WriteBlock().
| qlonglong BufferedSocketDevice::WriteBlockDirect | ( | const char * | data, |
| qulonglong | len | ||
| ) |
Definition at line 528 of file bufferedsocketdevice.cpp.
Referenced by UPnpEventTask::Execute(), UPNPSubscription::SendSubscribeRequest(), UPNPSubscription::SendUnsubscribeRequest(), and BufferedSocketDeviceRequest::WriteBlockDirect().
Definition at line 549 of file bufferedsocketdevice.cpp.
Definition at line 572 of file bufferedsocketdevice.cpp.
Definition at line 585 of file bufferedsocketdevice.cpp.
Definition at line 594 of file bufferedsocketdevice.cpp.
Referenced by BufferedSocketDeviceRequest::CanReadLine(), and ReadLine().
| QString BufferedSocketDevice::ReadLine | ( | ) |
Definition at line 608 of file bufferedsocketdevice.cpp.
Referenced by UPnpEventTask::Execute(), ReadLine(), BufferedSocketDeviceRequest::ReadLine(), UPNPSubscription::SendSubscribeRequest(), and UPNPSubscription::SendUnsubscribeRequest().
| QString BufferedSocketDevice::ReadLine | ( | int | msecs | ) |
Definition at line 633 of file bufferedsocketdevice.cpp.
| qlonglong BufferedSocketDevice::ReadLine | ( | char * | data, |
| qulonglong | maxlen | ||
| ) |
| quint16 BufferedSocketDevice::Port | ( | void | ) | const |
Definition at line 678 of file bufferedsocketdevice.cpp.
| quint16 BufferedSocketDevice::PeerPort | ( | void | ) | const |
Definition at line 690 of file bufferedsocketdevice.cpp.
| QHostAddress BufferedSocketDevice::Address | ( | ) | const |
Definition at line 702 of file bufferedsocketdevice.cpp.
| QHostAddress BufferedSocketDevice::PeerAddress | ( | ) | const |
Definition at line 716 of file bufferedsocketdevice.cpp.
| void BufferedSocketDevice::SetReadBufferSize | ( | qulonglong | bufSize | ) |
Definition at line 148 of file bufferedsocketdevice.cpp.
| qulonglong BufferedSocketDevice::ReadBufferSize | ( | void | ) | const |
Definition at line 157 of file bufferedsocketdevice.cpp.
| bool BufferedSocketDevice::IsValid | ( | void | ) | [inline] |
Definition at line 115 of file bufferedsocketdevice.h.
Referenced by HttpWorker::run().
| int BufferedSocketDevice::socket | ( | ) | [inline] |
Definition at line 116 of file bufferedsocketdevice.h.
Referenced by BufferedSocketDevice().
MSocketDevice* BufferedSocketDevice::m_pSocket [protected] |
Definition at line 42 of file bufferedsocketdevice.h.
Referenced by Address(), AtEnd(), BufferedSocketDevice(), BytesAvailable(), Close(), Connect(), Flush(), Getch(), PeerAddress(), PeerPort(), Port(), ReadBlock(), ReadBytes(), SetSocketDevice(), SocketDevice(), WaitForMore(), and WriteBlockDirect().
qulonglong BufferedSocketDevice::m_nMaxReadBufferSize [protected] |
Definition at line 44 of file bufferedsocketdevice.h.
Referenced by BufferedSocketDevice(), ReadBufferSize(), ReadBytes(), and SetReadBufferSize().
qint64 BufferedSocketDevice::m_nWriteSize [protected] |
write total buf size
Definition at line 45 of file bufferedsocketdevice.h.
Referenced by BufferedSocketDevice(), BytesToWrite(), ClearPendingData(), ConsumeWriteBuf(), Flush(), and WriteBlock().
qint64 BufferedSocketDevice::m_nWriteIndex [protected] |
write index
Definition at line 46 of file bufferedsocketdevice.h.
Referenced by BufferedSocketDevice(), ClearPendingData(), ConsumeWriteBuf(), and Flush().
bool BufferedSocketDevice::m_bHandleSocketDelete [protected] |
Definition at line 48 of file bufferedsocketdevice.h.
Referenced by BufferedSocketDevice(), Close(), and SetSocketDevice().
QHostAddress BufferedSocketDevice::m_DestHostAddress [protected] |
Definition at line 50 of file bufferedsocketdevice.h.
Referenced by Flush(), SetDestAddress(), and WriteBlockDirect().
quint16 BufferedSocketDevice::m_nDestPort [protected] |
Definition at line 51 of file bufferedsocketdevice.h.
Referenced by BufferedSocketDevice(), Flush(), SetDestAddress(), and WriteBlockDirect().
MMembuf BufferedSocketDevice::m_bufRead [protected] |
Definition at line 53 of file bufferedsocketdevice.h.
Referenced by At(), AtEnd(), CanReadLine(), ClearReadBuffer(), Close(), Getch(), ReadBlock(), ReadBytes(), ReadLine(), and Ungetch().
deque<QByteArray*> BufferedSocketDevice::m_bufWrite [protected] |
Definition at line 54 of file bufferedsocketdevice.h.
Referenced by ClearPendingData(), ConsumeWriteBuf(), Flush(), and WriteBlock().
1.7.6.1