how to set SO_REUSEADDR on the socket used by QTcpServer?
问题 I have been using a QTcpServer subclass as a http server, but now I need to reuse the server port. I have tried to set ShareAddress | ReuseAddressHint in a QTcpSocket, it seems worked, because the same port can be bound twice. But I did not find a way to get a QTcpSocket object from an existing QTcpServer object. I also used the socketDescriptor() to get the native socket, because I want to use the linux C way to setsockopt , but I don't know how to use linux C code with Qt code together to