PDA

View Full Version : Socket Descriptor



ManuMies
16th March 2009, 14:16
I have few questions about QLocalSocket's Socket Descriptor.

Can I use it as identifier?

How do I set it? Like this?

QString socketDescriptor = "test_socket";
socket->setSocketDescriptor(quintptr(&socketDescriptor));

And how do I read from it, i.e. how do I convert quintptr to qstring*?

pckoster
17th March 2009, 09:42
To me it appears that the socket descriptor is used like a file descriptor (http://en.wikipedia.org/wiki/Berkeley_sockets)

The reason you can set it is suggests to me that you can assign i.e. an existing socket descriptor to a new QLocalSocket instance.

It is certainly something you don't want to edit, but you can use it as a reference, if you like.