[Interest] Pass socket descriptor to external library

Bob Hood bhood2 at comcast.net
Wed Oct 21 02:34:20 CEST 2015


On 10/20/2015 3:12 PM, Giuseppe D'Angelo wrote:
> Il 20/10/2015 22:17, Bob Hood ha scritto:
>> For each incoming
>> connection, I need to pass the raw socket descriptor returned by
>> QTcpSocket::socketDescriptor() to the library interface for its exclusive use.
>>
>> Are there any conflicts in doing this?
>
> Yes, that QTcpSocket still owns the socket and wants to read from it, and 
> that will easily cause lots of troubles.
>
> Can't you simply subclass QTcpServer and override incomingConnection(), i.e. 
> NOT wrap the descriptor in a QTcpSocket?

Yes, seems that's my only/best option.  :)

Thanks for the responses, guys.




More information about the Interest mailing list