[Interest] QTcpServer stop accepting connections

Thiago Macieira thiago.macieira at intel.com
Thu Sep 5 17:33:15 CEST 2013


On quinta-feira, 5 de setembro de 2013 14:27:22, Benjamin Zeller wrote:
> > *Note:*The returnedQTcpSocketobject cannot be used from another thread.
> > If you want to use an incoming connection from another thread, you need
> > to overrideincomingConnection().
> 
> In fact we did override incomingConnection().
> Creating the QTcpSocket manually. But maybe QTcpSockets can not be
> moved between threads?

Yes, you can. The documentation note appears to be incomplete.

You can move, provided you first unset the parent of that QTcpSocket. The 
sockets that QTcpServer returns are parented to itself by default.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130905/4de2142d/attachment.sig>


More information about the Interest mailing list