• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdecore
 

tdecore

  • tdecore
  • network
kstreamsocket.h
1/*
2 * Copyright (C) 2003 Thiago Macieira <thiago@kde.org>
3 *
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining
6 * a copy of this software and associated documentation files (the
7 * "Software"), to deal in the Software without restriction, including
8 * without limitation the rights to use, copy, modify, merge, publish,
9 * distribute, sublicense, and/or sell copies of the Software, and to
10 * permit persons to whom the Software is furnished to do so, subject to
11 * the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included
14 * in all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 */
24
25#ifndef KSTREAMSOCKET_H
26#define KSTREAMSOCKET_H
27
28#include <tqstring.h>
29
30#include "kclientsocketbase.h"
31
33namespace KNetwork {
34
35class KResolverEntry;
36class KResolverResults;
37class TDEServerSocket;
38class TDEBufferedSocket;
39
40class KStreamSocketPrivate;
97class TDECORE_EXPORT KStreamSocket: public KClientSocketBase
98{
99 TQ_OBJECT
100
101
102public:
111 KStreamSocket(const TQString& node = TQString::null, const TQString& service = TQString::null,
112 TQObject* parent = 0L, const char *name = 0L);
113
117 virtual ~KStreamSocket();
118
122 int timeout() const;
123
128 int remainingTimeout() const;
129
140 void setTimeout(int msecs);
141
165 virtual bool bind(const TQString& node = TQString::null,
166 const TQString& service = TQString::null);
167
176 virtual bool bind(const KResolverEntry& entry)
177 { return KClientSocketBase::bind(entry); }
178
200 virtual bool connect(const TQString& node = TQString::null,
201 const TQString& service = TQString::null);
202
206 virtual bool connect(const KResolverEntry& entry);
207
208signals:
212 void timedOut();
213
214private slots:
215 void hostFoundSlot();
216 void connectionEvent();
217 void timeoutSlot();
218
219private:
227 bool bindLocallyFor(const KResolverEntry& peer);
228
237 void connectionSucceeded(const KResolverEntry& peer);
238
239 KStreamSocket(const KStreamSocket&);
240 KStreamSocket& operator=(const KStreamSocket&);
241
242 KStreamSocketPrivate *d;
243
244 friend class TDEServerSocket;
245 friend class TDEBufferedSocket;
246};
247
248} // namespace KNetwork
249
250#endif
KNetwork::KClientSocketBase
Abstract client socket class.
Definition: kclientsocketbase.h:50
KNetwork::KClientSocketBase::bind
virtual bool bind(const TQString &node=TQString::null, const TQString &service=TQString::null)=0
Binds this socket to the given nodename and service, or use the default ones if none are given.
KNetwork::KResolverEntry
One resolution entry.
Definition: kresolver.h:67
KNetwork::KStreamSocket
Simple stream socket.
Definition: kstreamsocket.h:98
KNetwork::KStreamSocket::bind
virtual bool bind(const KResolverEntry &entry)
Reimplemented from KClientSocketBase.
Definition: kstreamsocket.h:176
KNetwork::KStreamSocket::timedOut
void timedOut()
This signal is emitted when a connection timeout occurs.
KNetwork::TDEBufferedSocket
Buffered stream sockets.
Definition: kbufferedsocket.h:59
KNetwork::TDEServerSocket
A server socket for accepting connections.
Definition: kserversocket.h:108
TDEServerSocket
Monitors a port for incoming TCP/IP connections.
Definition: ksock.h:251
KNetwork
A namespace to store all networking-related (socket) classes.
Definition: kbufferedsocket.h:36

tdecore

Skip menu "tdecore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.9.4
This website is maintained by Timothy Pearson.