erqsor
27th December 2011, 18:10
Hello,
OK, title was hard to find, but here is my problem:
I'm using QTcpServer and QTcpSocket for creating higher-level classes.
When a connection is etablished, I need to send the socketDescriptor of a connected QTcpSocket (gived by the nextPendingConnection function of QTcpServer) to another class for creating a new socket instance.
I have no problems under windows, but I encounter some problems under Linux and I can't receive any data. I think the problem is from this:
We can read this in the Qt Documentation: Note: It is not possible to initialize two abstract sockets with the same native socket descriptor.
But nothing about how to "free" a socketDescriptor for using it in another class (or thread).
OK, title was hard to find, but here is my problem:
I'm using QTcpServer and QTcpSocket for creating higher-level classes.
When a connection is etablished, I need to send the socketDescriptor of a connected QTcpSocket (gived by the nextPendingConnection function of QTcpServer) to another class for creating a new socket instance.
I have no problems under windows, but I encounter some problems under Linux and I can't receive any data. I think the problem is from this:
We can read this in the Qt Documentation: Note: It is not possible to initialize two abstract sockets with the same native socket descriptor.
But nothing about how to "free" a socketDescriptor for using it in another class (or thread).