|
MythTV master
|
#include <libmythupnp/bufferedsocketdevice.h>
Public Member Functions | |
| BufferedSocketDevice (int nSocket) | |
| BufferedSocketDevice (MSocketDevice *pSocket=nullptr, 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 () |
| bool | At (qlonglong index) |
| bool | AtEnd () |
| qulonglong | BytesAvailable () |
| qulonglong | WaitForMore (std::chrono::milliseconds msecs, bool *timeout=nullptr) |
| 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 ch) |
| int | Ungetch (int ch) |
| bool | CanReadLine () |
| QString | ReadLine () |
| QString | ReadLine (std::chrono::milliseconds msecs) |
| qlonglong | ReadLine (char *data, qulonglong maxlen) |
| quint16 | Port () const |
| quint16 | PeerPort () const |
| QHostAddress | Address () const |
| QHostAddress | PeerAddress () const |
| void | SetReadBufferSize (qulonglong bufSize) |
| qulonglong | ReadBufferSize () const |
| bool | IsValid () |
| int | socket () |
Static Public Member Functions | |
| static qint64 | At () |
Protected Member Functions | |
| int | ReadBytes () |
| bool | ConsumeWriteBuf (qulonglong nbytes) |
Protected Attributes | |
| MSocketDevice * | m_pSocket {nullptr} |
| qulonglong | m_nMaxReadBufferSize {0} |
| qint64 | m_nWriteSize {0} |
| write total buf size More... | |
| qint64 | m_nWriteIndex {0} |
| write index More... | |
| bool | m_bHandleSocketDelete {true} |
| QHostAddress | m_destHostAddress |
| quint16 | m_nDestPort {0} |
| MMembuf | m_bufRead |
| std::deque< QByteArray * > | m_bufWrite |
Definition at line 39 of file bufferedsocketdevice.h.
|
explicit |
Definition at line 27 of file bufferedsocketdevice.cpp.
|
explicit |
Definition at line 46 of file bufferedsocketdevice.cpp.
|
virtual |
Definition at line 56 of file bufferedsocketdevice.cpp.
| QHostAddress BufferedSocketDevice::Address | ( | ) | const |
Definition at line 686 of file bufferedsocketdevice.cpp.
|
static |
Definition at line 321 of file bufferedsocketdevice.cpp.
Referenced by ReadLine().
| bool BufferedSocketDevice::At | ( | qlonglong | index | ) |
Definition at line 330 of file bufferedsocketdevice.cpp.
| bool BufferedSocketDevice::AtEnd | ( | ) |
Definition at line 347 of file bufferedsocketdevice.cpp.
| qulonglong BufferedSocketDevice::BytesAvailable | ( | void | ) |
Definition at line 362 of file bufferedsocketdevice.cpp.
Referenced by CanReadLine(), Size(), and WaitForMore().
| qulonglong BufferedSocketDevice::BytesToWrite | ( | void | ) | const |
Definition at line 426 of file bufferedsocketdevice.cpp.
| bool BufferedSocketDevice::CanReadLine | ( | ) |
Definition at line 581 of file bufferedsocketdevice.cpp.
Referenced by ReadLine().
| void BufferedSocketDevice::ClearPendingData | ( | ) |
Definition at line 436 of file bufferedsocketdevice.cpp.
Referenced by Close().
| void BufferedSocketDevice::ClearReadBuffer | ( | ) |
Definition at line 450 of file bufferedsocketdevice.cpp.
| void BufferedSocketDevice::Close | ( | void | ) |
Definition at line 65 of file bufferedsocketdevice.cpp.
Referenced by UPnpEventTask::Execute(), and ~BufferedSocketDevice().
| bool BufferedSocketDevice::Connect | ( | const QHostAddress & | addr, |
| quint16 | port | ||
| ) |
Definition at line 90 of file bufferedsocketdevice.cpp.
Referenced by UPnpEventTask::Execute().
|
protected |
Definition at line 207 of file bufferedsocketdevice.cpp.
Referenced by Flush().
| void BufferedSocketDevice::Flush | ( | void | ) |
Definition at line 243 of file bufferedsocketdevice.cpp.
Referenced by Close(), WriteBlock(), and WriteBlockDirect().
| int BufferedSocketDevice::Getch | ( | ) |
Definition at line 538 of file bufferedsocketdevice.cpp.
|
inline |
Definition at line 116 of file bufferedsocketdevice.h.
| QHostAddress BufferedSocketDevice::PeerAddress | ( | ) | const |
Definition at line 700 of file bufferedsocketdevice.cpp.
| quint16 BufferedSocketDevice::PeerPort | ( | void | ) | const |
Definition at line 674 of file bufferedsocketdevice.cpp.
| quint16 BufferedSocketDevice::Port | ( | void | ) | const |
Definition at line 662 of file bufferedsocketdevice.cpp.
| int BufferedSocketDevice::Putch | ( | int | ch | ) |
Definition at line 561 of file bufferedsocketdevice.cpp.
| qlonglong BufferedSocketDevice::ReadBlock | ( | char * | data, |
| qulonglong | maxlen | ||
| ) |
Definition at line 459 of file bufferedsocketdevice.cpp.
| qulonglong BufferedSocketDevice::ReadBufferSize | ( | void | ) | const |
Definition at line 145 of file bufferedsocketdevice.cpp.
|
protected |
Definition at line 154 of file bufferedsocketdevice.cpp.
Referenced by At(), AtEnd(), BytesAvailable(), CanReadLine(), Close(), Getch(), ReadBlock(), and ReadLine().
| QString BufferedSocketDevice::ReadLine | ( | ) |
Definition at line 592 of file bufferedsocketdevice.cpp.
Referenced by UPnpEventTask::Execute(), and ReadLine().
| qlonglong BufferedSocketDevice::ReadLine | ( | char * | data, |
| qulonglong | maxlen | ||
| ) |
| QString BufferedSocketDevice::ReadLine | ( | std::chrono::milliseconds | msecs | ) |
Definition at line 617 of file bufferedsocketdevice.cpp.
| void BufferedSocketDevice::SetDestAddress | ( | QHostAddress | hostAddress, |
| quint16 | nPort | ||
| ) |
Definition at line 125 of file bufferedsocketdevice.cpp.
| void BufferedSocketDevice::SetReadBufferSize | ( | qulonglong | bufSize | ) |
Definition at line 136 of file bufferedsocketdevice.cpp.
| void BufferedSocketDevice::SetSocketDevice | ( | MSocketDevice * | pSocket | ) |
Definition at line 111 of file bufferedsocketdevice.cpp.
| qlonglong BufferedSocketDevice::Size | ( | void | ) |
Definition at line 312 of file bufferedsocketdevice.cpp.
|
inline |
Definition at line 117 of file bufferedsocketdevice.h.
Referenced by BufferedSocketDevice().
| MSocketDevice * BufferedSocketDevice::SocketDevice | ( | ) |
Definition at line 102 of file bufferedsocketdevice.cpp.
| int BufferedSocketDevice::Ungetch | ( | int | ch | ) |
Definition at line 572 of file bufferedsocketdevice.cpp.
| qulonglong BufferedSocketDevice::WaitForMore | ( | std::chrono::milliseconds | msecs, |
| bool * | timeout = nullptr |
||
| ) |
Definition at line 374 of file bufferedsocketdevice.cpp.
Referenced by ReadLine().
| qlonglong BufferedSocketDevice::WriteBlock | ( | const char * | data, |
| qulonglong | len | ||
| ) |
Definition at line 482 of file bufferedsocketdevice.cpp.
Referenced by Putch().
| qlonglong BufferedSocketDevice::WriteBlockDirect | ( | const char * | data, |
| qulonglong | len | ||
| ) |
Definition at line 517 of file bufferedsocketdevice.cpp.
Referenced by UPnpEventTask::Execute().
Definition at line 49 of file bufferedsocketdevice.h.
Referenced by Close(), and SetSocketDevice().
|
protected |
Definition at line 54 of file bufferedsocketdevice.h.
Referenced by At(), AtEnd(), CanReadLine(), ClearReadBuffer(), Close(), Getch(), ReadBlock(), ReadBytes(), ReadLine(), and Ungetch().
|
protected |
Definition at line 55 of file bufferedsocketdevice.h.
Referenced by ClearPendingData(), ConsumeWriteBuf(), Flush(), and WriteBlock().
|
protected |
Definition at line 51 of file bufferedsocketdevice.h.
Referenced by Flush(), SetDestAddress(), and WriteBlockDirect().
|
protected |
Definition at line 52 of file bufferedsocketdevice.h.
Referenced by Flush(), SetDestAddress(), and WriteBlockDirect().
|
protected |
Definition at line 45 of file bufferedsocketdevice.h.
Referenced by ReadBufferSize(), ReadBytes(), and SetReadBufferSize().
|
protected |
write index
Definition at line 47 of file bufferedsocketdevice.h.
Referenced by ClearPendingData(), ConsumeWriteBuf(), and Flush().
|
protected |
write total buf size
Definition at line 46 of file bufferedsocketdevice.h.
Referenced by BytesToWrite(), ClearPendingData(), ConsumeWriteBuf(), Flush(), and WriteBlock().
|
protected |
Definition at line 43 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().