[Interest] Setting socket options for QWebSocketServer

Elvis Stansvik elvstone at gmail.com
Fri May 13 20:35:59 CEST 2016


2016-05-13 19:18 GMT+02:00 Elvis Stansvik <elvstone at gmail.com>:
> 2016-05-13 18:42 GMT+02:00 Elvis Stansvik <elvstone at gmail.com>:
>> 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.
>
> I just realized this is the default behavior of QTcpSocket, which

Here I meant QTcpServer, not QTcpSocket, and the code I meant was:

https://github.com/qtproject/qtbase/blob/dev/src/network/socket/qtcpserver.cpp#L169-L182

Elvis

> QWebSocketServer uses, on UNIX / OS X. So not that urgent anymore :)
>
> Would still be interested in an answer of course, but it seems it's
> not possible to control the socket options of the listening sockets
> underneath the *Server classes in Qt?
>
> Elvis
>
>>
>> Thanks,
>> Elvis



More information about the Interest mailing list