#include <bufferedsocketdevice.h>
Definition at line 29 of file bufferedsocketdevice.h.
Public Member Functions | |
| BufferedSocketDevice (int nSocket) | |
| BufferedSocketDevice (QSocketDevice *pSocket=NULL, bool bTakeOwnership=false) | |
| virtual | ~BufferedSocketDevice () |
| QSocketDevice * | SocketDevice () |
| void | SetSocketDevice (QSocketDevice *pSocket) |
| void | SetDestAddress (QHostAddress hostAddress, Q_UINT16 nPort) |
| bool | Connect (const QHostAddress &addr, Q_UINT16 port) |
| void | Close () |
| void | Flush () |
| QIODevice::Offset | Size () |
| QIODevice::Offset | At () |
| bool | At (QIODevice::Offset) |
| bool | AtEnd () |
| Q_ULONG | BytesAvailable () |
| Q_ULONG | WaitForMore (int msecs, bool *timeout=NULL) |
| Q_ULONG | BytesToWrite () const |
| void | ClearPendingData () |
| void | ClearReadBuffer () |
| Q_LONG | ReadBlock (char *data, Q_ULONG maxlen) |
| Q_LONG | WriteBlock (const char *data, Q_ULONG len) |
| Q_LONG | WriteBlockDirect (const char *data, Q_ULONG len) |
| int | Getch () |
| int | Putch (int) |
| int | Ungetch (int) |
| bool | CanReadLine () |
| QString | ReadLine () |
| QString | ReadLine (int msecs) |
| Q_LONG | ReadLine (char *data, Q_ULONG maxlen) |
| Q_UINT16 | Port () const |
| Q_UINT16 | PeerPort () const |
| QHostAddress | Address () const |
| QHostAddress | PeerAddress () const |
| void | SetReadBufferSize (Q_ULONG) |
| Q_ULONG | ReadBufferSize () const |
| bool | IsValid () |
| int | socket () |
Protected Member Functions | |
| int | ReadBytes () |
| bool | ConsumeWriteBuf (Q_ULONG nbytes) |
Protected Attributes | |
| QSocketDevice * | m_pSocket |
| Q_ULONG | m_nMaxReadBufferSize |
| QIODevice::Offset | m_nWriteSize |
| QIODevice::Offset | m_nWriteIndex |
| bool | m_bHandleSocketDelete |
| QHostAddress | m_DestHostAddress |
| Q_UINT16 | m_nDestPort |
| QMembuf | m_bufRead |
| QPtrList< QByteArray > | m_bufWrite |
| BufferedSocketDevice::BufferedSocketDevice | ( | int | nSocket | ) |
Definition at line 20 of file bufferedsocketdevice.cpp.
| BufferedSocketDevice::BufferedSocketDevice | ( | QSocketDevice * | pSocket = NULL, |
|
| bool | bTakeOwnership = false | |||
| ) |
Definition at line 47 of file bufferedsocketdevice.cpp.
| BufferedSocketDevice::~BufferedSocketDevice | ( | ) | [virtual] |
Definition at line 68 of file bufferedsocketdevice.cpp.
| int BufferedSocketDevice::ReadBytes | ( | ) | [protected] |
Definition at line 165 of file bufferedsocketdevice.cpp.
Referenced by At(), AtEnd(), BytesAvailable(), CanReadLine(), Close(), Getch(), ReadBlock(), and ReadLine().
| bool BufferedSocketDevice::ConsumeWriteBuf | ( | Q_ULONG | nbytes | ) | [protected] |
| QSocketDevice * BufferedSocketDevice::SocketDevice | ( | ) |
| void BufferedSocketDevice::SetSocketDevice | ( | QSocketDevice * | pSocket | ) |
Definition at line 123 of file bufferedsocketdevice.cpp.
| void BufferedSocketDevice::SetDestAddress | ( | QHostAddress | hostAddress, | |
| Q_UINT16 | nPort | |||
| ) |
Definition at line 137 of file bufferedsocketdevice.cpp.
| bool BufferedSocketDevice::Connect | ( | const QHostAddress & | addr, | |
| Q_UINT16 | port | |||
| ) |
| void BufferedSocketDevice::Close | ( | void | ) |
Definition at line 77 of file bufferedsocketdevice.cpp.
Referenced by UPnpEventTask::Execute(), HttpWorkerThread::ProcessWork(), and ~BufferedSocketDevice().
| void BufferedSocketDevice::Flush | ( | void | ) |
Definition at line 248 of file bufferedsocketdevice.cpp.
Referenced by Close(), BufferedSocketDeviceRequest::Flush(), WriteBlock(), and WriteBlockDirect().
| QIODevice::Offset BufferedSocketDevice::Size | ( | ) |
Definition at line 313 of file bufferedsocketdevice.cpp.
| QIODevice::Offset BufferedSocketDevice::At | ( | ) |
| bool BufferedSocketDevice::At | ( | QIODevice::Offset | index | ) |
Definition at line 331 of file bufferedsocketdevice.cpp.
| bool BufferedSocketDevice::AtEnd | ( | ) |
Definition at line 347 of file bufferedsocketdevice.cpp.
| Q_ULONG BufferedSocketDevice::BytesAvailable | ( | ) |
Definition at line 362 of file bufferedsocketdevice.cpp.
Referenced by BufferedSocketDeviceRequest::BytesAvailable(), CanReadLine(), Size(), and WaitForMore().
| Q_ULONG BufferedSocketDevice::WaitForMore | ( | int | msecs, | |
| bool * | timeout = NULL | |||
| ) |
Definition at line 374 of file bufferedsocketdevice.cpp.
Referenced by HttpWorkerThread::ProcessWork(), BufferedSocketDeviceRequest::ReadBlock(), ReadLine(), and BufferedSocketDeviceRequest::WaitForMore().
| Q_ULONG BufferedSocketDevice::BytesToWrite | ( | ) | const |
Definition at line 424 of file bufferedsocketdevice.cpp.
| void BufferedSocketDevice::ClearPendingData | ( | ) |
Definition at line 434 of file bufferedsocketdevice.cpp.
| void BufferedSocketDevice::ClearReadBuffer | ( | ) |
Definition at line 444 of file bufferedsocketdevice.cpp.
| Q_LONG BufferedSocketDevice::ReadBlock | ( | char * | data, | |
| Q_ULONG | maxlen | |||
| ) |
Definition at line 453 of file bufferedsocketdevice.cpp.
Referenced by BufferedSocketDeviceRequest::ReadBlock().
| Q_LONG BufferedSocketDevice::WriteBlock | ( | const char * | data, | |
| Q_ULONG | len | |||
| ) |
Definition at line 476 of file bufferedsocketdevice.cpp.
Referenced by Putch(), and BufferedSocketDeviceRequest::WriteBlock().
| Q_LONG BufferedSocketDevice::WriteBlockDirect | ( | const char * | data, | |
| Q_ULONG | len | |||
| ) |
Definition at line 514 of file bufferedsocketdevice.cpp.
Referenced by UPnpEventTask::Execute(), and BufferedSocketDeviceRequest::WriteBlockDirect().
| int BufferedSocketDevice::Getch | ( | ) |
Definition at line 534 of file bufferedsocketdevice.cpp.
| int BufferedSocketDevice::Putch | ( | int | ch | ) |
Definition at line 557 of file bufferedsocketdevice.cpp.
| int BufferedSocketDevice::Ungetch | ( | int | ch | ) |
Definition at line 570 of file bufferedsocketdevice.cpp.
| bool BufferedSocketDevice::CanReadLine | ( | ) |
Definition at line 579 of file bufferedsocketdevice.cpp.
Referenced by BufferedSocketDeviceRequest::CanReadLine(), and ReadLine().
| QString BufferedSocketDevice::ReadLine | ( | ) |
Definition at line 593 of file bufferedsocketdevice.cpp.
Referenced by UPnpEventTask::Execute(), BufferedSocketDeviceRequest::ReadLine(), and ReadLine().
| QString BufferedSocketDevice::ReadLine | ( | int | msecs | ) |
Definition at line 617 of file bufferedsocketdevice.cpp.
| Q_LONG BufferedSocketDevice::ReadLine | ( | char * | data, | |
| Q_ULONG | maxlen | |||
| ) |
| Q_UINT16 BufferedSocketDevice::Port | ( | ) | const |
Definition at line 661 of file bufferedsocketdevice.cpp.
| Q_UINT16 BufferedSocketDevice::PeerPort | ( | ) | const |
Definition at line 673 of file bufferedsocketdevice.cpp.
| QHostAddress BufferedSocketDevice::Address | ( | ) | const |
Definition at line 685 of file bufferedsocketdevice.cpp.
| QHostAddress BufferedSocketDevice::PeerAddress | ( | ) | const |
Definition at line 699 of file bufferedsocketdevice.cpp.
| void BufferedSocketDevice::SetReadBufferSize | ( | Q_ULONG | bufSize | ) |
Definition at line 147 of file bufferedsocketdevice.cpp.
| Q_ULONG BufferedSocketDevice::ReadBufferSize | ( | ) | const |
Definition at line 156 of file bufferedsocketdevice.cpp.
| bool BufferedSocketDevice::IsValid | ( | ) | [inline] |
Definition at line 100 of file bufferedsocketdevice.h.
Referenced by BufferedSocketDeviceRequest::IsValid(), and HttpWorkerThread::ProcessWork().
| int BufferedSocketDevice::socket | ( | ) | [inline] |
Definition at line 101 of file bufferedsocketdevice.h.
Referenced by BufferedSocketDevice(), and BufferedSocketDeviceRequest::getSocketHandle().
QSocketDevice* BufferedSocketDevice::m_pSocket [protected] |
Definition at line 33 of file bufferedsocketdevice.h.
Referenced by Address(), AtEnd(), BufferedSocketDevice(), BytesAvailable(), Close(), Connect(), Flush(), Getch(), IsValid(), PeerAddress(), PeerPort(), Port(), ReadBlock(), ReadBytes(), SetSocketDevice(), socket(), SocketDevice(), WaitForMore(), and WriteBlockDirect().
Q_ULONG BufferedSocketDevice::m_nMaxReadBufferSize [protected] |
Definition at line 35 of file bufferedsocketdevice.h.
Referenced by BufferedSocketDevice(), ReadBufferSize(), ReadBytes(), and SetReadBufferSize().
QIODevice::Offset BufferedSocketDevice::m_nWriteSize [protected] |
Definition at line 36 of file bufferedsocketdevice.h.
Referenced by BufferedSocketDevice(), BytesToWrite(), ClearPendingData(), ConsumeWriteBuf(), Flush(), and WriteBlock().
QIODevice::Offset BufferedSocketDevice::m_nWriteIndex [protected] |
Definition at line 37 of file bufferedsocketdevice.h.
Referenced by BufferedSocketDevice(), ClearPendingData(), ConsumeWriteBuf(), and Flush().
bool BufferedSocketDevice::m_bHandleSocketDelete [protected] |
Definition at line 39 of file bufferedsocketdevice.h.
Referenced by BufferedSocketDevice(), Close(), and SetSocketDevice().
QHostAddress BufferedSocketDevice::m_DestHostAddress [protected] |
Definition at line 41 of file bufferedsocketdevice.h.
Referenced by Flush(), SetDestAddress(), and WriteBlockDirect().
Q_UINT16 BufferedSocketDevice::m_nDestPort [protected] |
Definition at line 42 of file bufferedsocketdevice.h.
Referenced by BufferedSocketDevice(), Flush(), SetDestAddress(), and WriteBlockDirect().
QMembuf BufferedSocketDevice::m_bufRead [protected] |
Definition at line 44 of file bufferedsocketdevice.h.
Referenced by At(), AtEnd(), CanReadLine(), ClearReadBuffer(), Close(), Getch(), ReadBlock(), ReadBytes(), ReadLine(), and Ungetch().
QPtrList<QByteArray> BufferedSocketDevice::m_bufWrite [protected] |
Definition at line 45 of file bufferedsocketdevice.h.
Referenced by BufferedSocketDevice(), ClearPendingData(), Close(), ConsumeWriteBuf(), Flush(), and WriteBlock().
1.5.5