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

DirectConnectionBase Class Reference
[network/extra]

#include <directconnectionbase.h>

Inheritance diagram for DirectConnectionBase:

MsnDirectConnection MsnFtpConnection

List of all members.


Detailed Description

The class for receiving and sending files.

Author:
Diederik van der Boor

Definition at line 35 of file directconnectionbase.h.


Signals

void connectionAuthorized ()
void connectionClosed ()
void connectionEstablished ()
void connectionFailed ()
void writeHandlerReady ()

Public Member Functions

virtual void closeConnection ()
void connectWriteHandler (QObject *receiver, const char *slot)
 DirectConnectionBase (QObject *parent=0, const char *name=0)
void disconnectWriteHandler (QObject *receiver, const char *slot)
int getLocalServerPort ()
QString getRemoteIp () const
QString getRemotePort () const
QString getSocketError () const
bool hasLastWriteFailed () const
bool hasTemporaryWriteError () const
bool hasTimedOut () const
virtual bool initialize ()
virtual bool isAuthorized () const
bool isConnected () const
bool isServer () const
bool isWriteHandlerConnected () const
bool openConnection (const QString &ipAddress, int port, bool async=false)
bool openServerPort ()

Protected Slots

virtual void slotConnectionEstablished ()
virtual void slotConnectionFailed ()
virtual void slotDataReceived ()=0

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 slotAcceptConnection ()
void slotConnectionTimeout ()
void slotSocketClosed (int state)
void slotSocketConnected ()
virtual void slotSocketFailed ()
void slotSocketReadyWrite ()

Private Member Functions

bool closeClientSocket ()

Private Attributes

KMessBuffer additionalWriteBuffer_
bool authorized_
QString connectingTo_
QTimer connectionTimer_
bool isServer_
bool lastWriteFailed_
KExtendedSocket * server_
int serverPort_
KExtendedSocket * socket_
bool timeout_
bool userCancelled_
int writeHandlerCount_

Static Private Attributes

static int nextServerPort_

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

Generated by  Doxygen 1.6.0   Back to index