PDA

View Full Version : Communication between a pure unix local socket client and a QLocalServer



nooky59
26th March 2009, 14:14
Hi everybody,

I have a GUI software running a QLocalServer and I want to have a pure console lightweight system process that send informations to this QLocalServer.

On Windows, it works perfectly with the win32 call to CallNamedPipe.

On Linux, I tried to use a local socket (as the Qt doc tell that QLocalServer is implemanted like that) but I have a problem. The QLocalServer detect a connection but don't get anything in the QByteArray buffer.

However, the same Unix client works perfectly if I run a pure unix local socket server rather than a Qt one.

Does someone face with a similar problem ? Must I send something particular on the client side so Qt can handle it on the server side ? It would be quite surprising as I didn't need to do such things on a Windows box...

nooky59
27th March 2009, 13:20
I answer to myself if it could help someone else...

This is just a matter of dealing with the waitForReadyRead() method (or the signal readyRead() depending of your source code architecture).