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

MsnDirectConnection Class Reference

#include <msndirectconnection.h>

Inheritance diagram for MsnDirectConnection:


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.

Diederik van der Boor

Definition at line 34 of file msndirectconnection.h.


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
int getLocalServerPort ()
QString getRemoteIp () const
QString 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, int port, bool async=false)
bool openServerPort ()
bool sendMessage (const QByteArray &message)

Protected Slots

virtual void slotConnectionEstablished ()
virtual void slotConnectionFailed ()

Protected Member Functions

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

Protected Attributes

QTime lastActivity_

Private Slots

void slotDataReceived ()

Private Attributes

QByteArray buffer_
uint bufferOffset_
QString contactHandle_
bool firstMessage_
QByteArray preambleBuffer_
int preambleOffset_
uint remainingBlockBytes_

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

Generated by  Doxygen 1.6.0   Back to index