KDECore
Go to the documentation of this file.
28 #include <config-network.h>
30 #include <QSocketNotifier>
39 using namespace KNetwork;
41 class KNetwork::KStreamSocketPrivate
44 KResolverResults::ConstIterator local, peer;
50 inline KStreamSocketPrivate()
87 return timeout() - d->startTime.elapsed();
95 d->timer.start(msecs);
105 if (!service.isNull())
127 if (!service.isNull())
157 if (!
blocking() && !d->timer.isActive())
159 d->timer.setSingleShot(
true);
209 void KStreamSocket::hostFoundSlot()
214 d->timer.setSingleShot(
true);
217 QTimer::singleShot(0,
this, SLOT(connectionEvent()));
220 void KStreamSocket::connectionEvent()
228 d->startTime.start();
232 d->peer = peer.begin();
236 while (d->peer != peer.end())
247 connectionSucceeded(r);
262 if (!bindLocallyFor(r))
286 this, SLOT(connectionEvent()));
291 this, SLOT(connectionEvent()));
298 connectionSucceeded(r);
317 void KStreamSocket::timeoutSlot()
329 QPointer<KStreamSocket> that =
this;
344 bool foundone =
false;
346 for (d->local = local.begin(); d->local != local.end(); ++d->local)
347 if ((*d->local).family() == peer.
family())
367 void KStreamSocket::connectionSucceeded(
const KResolverEntry& peer)
380 emit
bound(*d->local);
384 #include "k3streamsocket.moc"
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Tue Jul 23 2013 21:56:47 by
doxygen 1.8.1.1 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.