QLocalSocket and QLocalServer in browser plugins

Posted by kambamsu on Stack Overflow See other posts from Stack Overflow or by kambamsu
Published on 2010-05-05T08:31:39Z Indexed on 2010/05/05 8:38 UTC
Read the original article Hit count: 350

Filed under:
|
|
|

Hi,

I have a simple doubt. Does the ipc mechanism in qt work when we use it for developing browser plugins? The reason i ask this is that I can easily get the QLocalSocket and QLocalServer communication to work in a qt application, but when i write a similar piece of code in a browser plugin dll i see that the server does not accept a new connection at all.

This is what i do in the server:

 server = new QLocalServer(this);
            if( !server->listen("myServer"))
            {
                writeFile("Listen failed");
            }
            connect(server, SIGNAL(newConnection()), this, SLOT(handleConn()),Qt::QueuedConnection);

and this is what i do in the client:

client = new QLocalSocket(this);
            client->abort();
            QObject::connect(client,SIGNAL(connected()),this,SLOT(connClient()),Qt::QueuedConnection);
            client->connectToServer("myServer");

after i call connectToServer, my client emits the connected() signal and the connClient() slot is called. But, on the server side, there is no signal emitted. It doesn't seem to be receiving any connection at all.

Any help would be appreciated.

Thanks

© Stack Overflow or respective owner

Related posts about ipc

Related posts about qt