BufferedSocketDevice Class Reference

#include <bufferedsocketdevice.h>

List of all members.


Detailed Description

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

Constructor & Destructor Documentation

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.


Member Function Documentation

int BufferedSocketDevice::ReadBytes (  )  [protected]

bool BufferedSocketDevice::ConsumeWriteBuf ( Q_ULONG  nbytes  )  [protected]

Definition at line 213 of file bufferedsocketdevice.cpp.

Referenced by Flush().

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 
)

Definition at line 102 of file bufferedsocketdevice.cpp.

Referenced by UPnpEventTask::Execute().

void BufferedSocketDevice::Close ( void   ) 

void BufferedSocketDevice::Flush ( void   ) 

QIODevice::Offset BufferedSocketDevice::Size (  ) 

Definition at line 313 of file bufferedsocketdevice.cpp.

QIODevice::Offset BufferedSocketDevice::At (  ) 

Definition at line 322 of file bufferedsocketdevice.cpp.

Referenced by ReadLine().

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 (  ) 

Q_ULONG BufferedSocketDevice::WaitForMore ( int  msecs,
bool timeout = NULL 
)

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 
)

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 (  ) 

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]

int BufferedSocketDevice::socket (  )  [inline]


Member Data Documentation

QSocketDevice* BufferedSocketDevice::m_pSocket [protected]

QIODevice::Offset BufferedSocketDevice::m_nWriteSize [protected]

QIODevice::Offset BufferedSocketDevice::m_nWriteIndex [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]

QMembuf BufferedSocketDevice::m_bufRead [protected]

QPtrList<QByteArray> BufferedSocketDevice::m_bufWrite [protected]


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

Generated on Sat Dec 18 05:16:00 2010 for MythTV by  doxygen 1.5.5