Reply
Thread Tools
Posts: 225 | Thanked: 64 times | Joined on Feb 2010
#1
Hi all

Having raided the Threaded Fortune Server example, theres a section of code I copied from it that causes this message to print out in the console. I've subclasses thread to create a worker that will read and write the socket, and passed the socket descriptor to the workerthread's constructor.
In the workerthread's run method I call:

tcpSocket.setSocketDescriptor(theSocketDescriptor)

where the int passed in is the socket descriptor, got from the listening socket.

This in turn calls trolltech's code:
d->socketEngine = QAbstractSocketEngine::createSocketEngine(socketDe scriptor, this);

where "this" is the abstract socket itself.

I'm thinking that instead of passing the socketDescriptor to the worker and letting it set the socket up itself, I should set the socketDescriptor from the thread that creates the worker? Is this how I get this message to go away?
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 22:26.