kstreamsocket.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef KSTREAMSOCKET_H
00026 #define KSTREAMSOCKET_H
00027
00028 #include <qstring.h>
00029
00030 #include "kclientsocketbase.h"
00031
00032 namespace KNetwork {
00033
00034 class KResolverEntry;
00035 class KResolverResults;
00036 class KServerSocket;
00037
00038 class KStreamSocketPrivate;
00091 class KStreamSocket: public KClientSocketBase
00092 {
00093 Q_OBJECT
00094
00095 public:
00104 KStreamSocket(const QString& node = QString::null, const QString& service = QString::null,
00105 QObject* parent = 0L, const char *name = 0L);
00106
00110 virtual ~KStreamSocket();
00111
00115 int timeout() const;
00116
00121 int remainingTimeout() const;
00122
00133 void setTimeout(int msecs);
00134
00158 virtual bool bind(const QString& node = QString::null,
00159 const QString& service = QString::null);
00160
00169 virtual bool bind(const KResolverEntry& entry)
00170 { return KClientSocketBase::bind(entry); }
00171
00193 virtual bool connect(const QString& node = QString::null,
00194 const QString& service = QString::null);
00195
00199 virtual bool connect(const KResolverEntry& entry);
00200
00201 signals:
00205 void timedOut();
00206
00207 private slots:
00208 void hostFoundSlot();
00209 void connectionEvent();
00210 void timeoutSlot();
00211
00212 private:
00220 bool bindLocallyFor(const KResolverEntry& peer);
00221
00230 void connectionSucceeded(const KResolverEntry& peer);
00231
00232 KStreamSocket(const KStreamSocket&);
00233 KStreamSocket& operator=(const KStreamSocket&);
00234
00235 KStreamSocketPrivate *d;
00236
00237 friend class KServerSocket;
00238 };
00239
00240 }
00241
00242 #endif
This file is part of the documentation for kdecore Library Version 3.3.1.