[Interest] Setting socket options for QWebSocketServer

Elvis Stansvik elvstone at gmail.com
Fri May 13 20:33:53 CEST 2016


2016-05-13 19:41 GMT+02:00 Thiago Macieira <thiago.macieira at intel.com>:
> On sexta-feira, 13 de maio de 2016 18:42:16 PDT Elvis Stansvik wrote:
>> Hi all,
>>
>> I'm looking for a way to control the socket options used for the listening
>> socket of a QWebSocketServer.
>>
>> Is there really no way of doing this short of setting up a native socket
>> myself and passing it to setSocketDescriptor? The option I wish to set is
>> SO_REUSEADDR in UNIX terms, so I want the equivalent of
>> QAbstractSocket::ReuseAddressHint but for QWebSocketServer.
>
> You can't reuseaddr with TCP.

Hmm, I thought that was quite common in TCP servers? To use
SO_REUSEADDR in order to avoid the IP/port combo remaining in the
TIME_WAIT state for a long time, should the server closed unexpectedly
with connected clients. I know it might not be the best practice.. but
you mean I can't?

Elvis

>
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel Open Source Technology Center
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest



More information about the Interest mailing list