Results 1 to 2 of 2

Thread: Communication between a pure unix local socket client and a QLocalServer

  1. #1
    Join Date
    Nov 2007
    Posts
    53
    Thanked 3 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Communication between a pure unix local socket client and a QLocalServer

    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...

  2. #2
    Join Date
    Nov 2007
    Posts
    53
    Thanked 3 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Communication between a pure unix local socket client and a QLocalServer

    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).

  3. The following user says thank you to nooky59 for this useful post:

    THSnixstd (17th November 2010)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.