Logo Search packages:      
Sourcecode: kmess version File versions  Download package

MsnDirectConnection Class Reference
[network/extra]

#include <msndirectconnection.h>

Inheritance diagram for MsnDirectConnection:

DirectConnectionBase

List of all members.


Detailed Description

A connection used to transfer MSNP2P data (e.g. files) directly between two end-hosts. This connection can be established during a P2PApplication invitation.

Author:
Diederik van der Boor

Definition at line 37 of file msndirectconnection.h.


Signals

void connectionAuthorized ()
void connectionClosed ()
void connectionEstablished ()
void connectionFailed ()
void messageReceived (const QByteArray &message)
void writeHandlerReady ()

Public Member Functions

virtual void closeConnection ()
void connectWriteHandler (QObject *receiver, const char *slot)
void disconnectWriteHandler (QObject *receiver, const char *slot)
const QString & getContactHandle () const
quint16 getLocalServerPort ()
QString getRemoteIp () const
quint16 getRemotePort () const
QString getSocketError () const
bool hasLastWriteFailed () const
bool hasTemporaryWriteError () const
bool hasTimedOut () const
bool initialize ()
virtual bool isAuthorized () const
bool isConnected () const
bool isServer () const
bool isWriteHandlerConnected () const
 MsnDirectConnection (const QString &contactHandle)
bool openConnection (const QString &ipAddress, const quint16 port)
bool openServerPort ()
bool sendMessage (const QByteArray &message)

Protected Slots

virtual void slotConnectionEstablished ()
virtual void slotConnectionFailed ()

Protected Member Functions

bool closeServerSocket ()
qint64 getAvailableBytes () const
QString getListeningServiceName () const
qint64 peekBlock (const qint64 size)
qint64 readBlock (QBuffer &buffer, const qint64 maxSize=0)
qint64 readBlock (QByteArray &buffer, const qint64 maxSize=0, const qint64 offset=0)
qint64 readBlock (char *buffer, const qint64 size)
void setAuthorized (bool authorized)
bool writeBlock (const QByteArray &block)
bool writeBlock (const char *block, const qint64 size)
 Write data to the socket.

Protected Attributes

QTime lastActivity_

Private Slots

void slotSocketDataReceived ()

Private Attributes

QByteArray buffer_
quint64 bufferOffset_
QString contactHandle_
bool firstMessage_
QByteArray preambleBuffer_
qint64 preambleOffset_
quint64 remainingBlockBytes_

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

Generated by  Doxygen 1.6.0   Back to index