Results 1 to 3 of 3

Thread: Using multiple applications on same port? (UDP) [Solved]

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2008
    Posts
    27
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Using multiple applications on same port? (UDP) [Solved]

    Hi all,

    Currently, I am building a set of 4 programs that have to communicate with each other using the TCP sockets. Since I don't have experience with network programming, I took the chat example (link) and pretty much build my applications on top of this.

    Somehow one of the programs can only aquire data from one of the other programs, instead of all 3 other programs. To see what went wrong, I tested the example mentioned above.

    When this example gets opened 4 times on the same machine, not all clients get connected to each other. When a message is sent in one client, it is not received in all other clients. (You can test this yourself to see what I mean).

    This makes some sense because since the application uses UDP, and the used port is hardcoded, this means that all instances of the application use the same port (using shareAddress). When I change the port number that one of the programs uses, this program does not receive any data at all.

    So my question is: Can you give me directions to a way to make all 4 programs communicate with each other using the TCP sockets?

    If you need to see some code, please tell me which part and I will post it for you.

    Thanks in advance!
    Last edited by DrDonut; 3rd June 2010 at 14:39.

Similar Threads

  1. Applications don't start
    By gls in forum Qt for Embedded and Mobile
    Replies: 3
    Last Post: 22nd September 2007, 06:36
  2. Distributing multiple Qt applications?
    By gfunk in forum Qt Programming
    Replies: 5
    Last Post: 23rd August 2007, 17:41
  3. what's the matter with my qt applications?
    By xylosper in forum Qt Programming
    Replies: 4
    Last Post: 12th June 2007, 17:25
  4. Deploying QT applications
    By SteM in forum Installation and Deployment
    Replies: 3
    Last Post: 6th June 2007, 10:08
  5. Replies: 0
    Last Post: 21st December 2006, 11:48

Tags for this Thread

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.