×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Aug 2009
    Posts
    22

    Qt IPC - QLocalServer

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

    Any help on what I'm doing wrong?

    Thanks a ton in advance

  2. #2
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Qt IPC - QLocalServer

    Quote Originally Posted by kambamsu View Post
    I tried 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. Any help on what I'm doing wrong?
    Honestly, do you really believe it's enough information to say what you are doing wrong?

  3. #3
    Registered User
    Join Date
    Aug 2009
    Posts
    22

    Re: Qt IPC - QLocalServer

    Alright, let me put it this way then.

    I have a qt browser plugin (the basic trivial one). My plugin has two variables one of QLocalSocket and one of QLocalServer. Based on what the current url of a page is, one of them will be instantiated.

    While instantiating the server, i do the following:

    Code:
    server = new QLocalServer(this);
    server->listen("myserver");
    connect(server, SIGNAL(newConnection()), this, SLOT(handleConn()));
    While instantiating the client i do the following:

    Code:
    client = new QLocalSocket(this);
    connect(client, SIGNAL(connected()), this, SLOT(connClient()));
    client->connectToServer("myserver");
    in my client page, after the connectToServer call, the connClient() method is called, which means the connection is established.
    Whereas, in my server side, the newConnection() signal doesn't seem to be emitted.

    Hope this explains it better.
    Last edited by kambamsu; 2010-04-21 at 12:53. Reason: minor change in code

  4. #4
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: Qt IPC - QLocalServer

    Depending on execution order, it could be that the newConnection signal is going off before you do the corresponding connect operation.

  5. #5
    Registered User
    Join Date
    Aug 2009
    Posts
    22

    Re: Qt IPC - QLocalServer

    I'm pretty sure that isn't the reason. In my logs, i can clearly see the connect being done way before the client is even instantiated.

Similar Threads

  1. Qt for Symbian development resources
    By liuxg in forum [Archived] Qt General ( Qt技术)
    Replies: 55
    Last Post: 2011-01-26, 04:06
  2. automatic rotate screen on meamo
    By fily_love in forum Nokia N9
    Replies: 27
    Last Post: 2010-04-06, 08:37
  3. gsreamer-0.10-plugins-good+Phonon
    By niqt in forum Nokia N9
    Replies: 10
    Last Post: 2010-03-05, 09:56
  4. kinetic scrolling
    By stalep in forum Nokia N9
    Replies: 10
    Last Post: 2009-12-08, 12:41

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×