• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KDECore

  • sources
  • kde-4.14
  • kdelibs
  • kdecore
  • network
k3streamsocket.h
Go to the documentation of this file.
1 /* -*- C++ -*-
2  * Copyright (C) 2003,2005 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 <QtCore/QString>
29 
30 #include "k3clientsocketbase.h"
31 
33 namespace KNetwork {
34 
35 class KResolverEntry;
36 class KServerSocket;
37 class KBufferedSocket;
38 
39 class KStreamSocketPrivate;
98 class KDECORE_EXPORT_DEPRECATED KStreamSocket: public KClientSocketBase
99 {
100  Q_OBJECT
101 
102 public:
110  explicit KStreamSocket(const QString& node = QString(), const QString& service = QString(),
111  QObject* parent = 0L);
112 
116  virtual ~KStreamSocket();
117 
121  int timeout() const;
122 
127  int remainingTimeout() const;
128 
139  void setTimeout(int msecs);
140 
164  virtual bool bind(const QString& node = QString(),
165  const QString& service = QString());
166 
175  virtual bool bind(const KResolverEntry& entry);
176 
199  virtual bool connect(const QString& node = QString(),
200  const QString& service = QString(),
201  OpenMode mode = ReadWrite);
202 
206  virtual bool connect(const KResolverEntry& entry,
207  OpenMode mode = ReadWrite);
208 
209 Q_SIGNALS:
213  void timedOut();
214 
215 private Q_SLOTS:
216  void hostFoundSlot();
217  void connectionEvent();
218  void timeoutSlot();
219 
220 private:
228  bool bindLocallyFor(const KResolverEntry& peer);
229 
238  void connectionSucceeded(const KResolverEntry& peer);
239 
240  KStreamSocket(const KStreamSocket&);
241  KStreamSocket& operator=(const KStreamSocket&);
242 
243  KStreamSocketPrivate* const d;
244 
245  friend class KServerSocket;
246  friend class KBufferedSocket;
247 };
248 
249 } // namespace KNetwork
250 
251 #endif
KNetwork::KStreamSocket
Simple stream socket.
Definition: k3streamsocket.h:98
k3clientsocketbase.h
KNetwork::KServerSocket
A server socket for accepting connections.
Definition: k3serversocket.h:108
timeout
int timeout
Definition: kkernel_mac.cpp:46
KNetwork::KResolverEntry
One resolution entry.
Definition: k3resolver.h:68
QObject
KNetwork::KBufferedSocket
Buffered stream sockets.
Definition: k3bufferedsocket.h:58
QString
KNetwork::KClientSocketBase
Abstract client socket class.
Definition: k3clientsocketbase.h:50
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:10 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDECore

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal