views:

67

answers:

0

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