views:

310

answers:

1

Hi,

I'm developing a qt browser plugin and want to implement named pipes in it. I tried the basic fortune cookie example provided with the QLocalSocket and QLocalServer in an exe and it works fine. But when i try to implement a similar thing in the browser plugin, making a page where the plugin is present listen to a name (like a server) and another tab/window which tries to connect to this. But this doesn't seem to work. When i do a client->errorString() it prints out "Unknown Error".

Any help on what I'm doing wrong?

Thanks a ton in advance

A: 

Put debug output to check the following things:

Has your client asked for a connection?
Has the server received a request to setup a connection?
Has each entity created it's QLocalSocket instance?
What does QLocalSocket::state() say on both entities?

Possible causes:
Have both of your code paths received cpu-time (seperate threads in the same process?)?
Is there a deadlock?

Pieter