Results 1 to 7 of 7

Thread: Single server checking multiple client simultaneously - How to?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2014
    Posts
    12
    Thanks
    3
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Single server checking multiple client simultaneously - How to?

    Hi,

    Now I have 2 new questions.

    1. If I get same response from all clients and if I send 6 independent iport/path request, how can I know that which response belongs to which client? And if any of the clients not reply (i mean reply returns with error code), then how can i know which one of them has not replied?

    2. Could you please give more detail about iport pair? Assume that there is 1 QNetworkAccessManager, so does it mean I can send 6 request in total or 6 request per ip-port pair?
    ie.
    lets say there is 4 different ip-port pairs
    1.2.3.4:80
    1.2.3.4:81
    1.2.3.5:80
    1.2.3.6:80
    consider the first 2 pair: can i send 6 seperate and simultaneous request per pair? that means i can send 6 request per port hence ip address doesn't effect the limitation of requests. Considering the all pairs, can i send 24 simutaneous and seperated request with just 1 QNetworkAccessManager?

    thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Single server checking multiple client simultaneously - How to?

    Quote Originally Posted by canavaroski90 View Post
    1. If I get same response from all clients and if I send 6 independent iport/path request, how can I know that which response belongs to which client?
    Each request is handled by its own QNetworkReply instance. It contains the QNetworkRequest object that was used to initiate the operation, even has a convenience accessor for the URL.

    Quote Originally Posted by canavaroski90 View Post
    And if any of the clients not reply (i mean reply returns with error code), then how can i know which one of them has not replied?
    Those for which you have not gotten the finished() signal. If you want to impose some timeout, do that with a timer.

    Quote Originally Posted by canavaroski90 View Post
    2. Could you please give more detail about iport pair? Assume that there is 1 QNetworkAccessManager, so does it mean I can send 6 request in total or 6 request per ip-port pair?
    6 per pair, any number if you have different pairs.

    Quote Originally Posted by canavaroski90 View Post
    Considering the all pairs, can i send 24 simutaneous and seperated request with just 1 QNetworkAccessManager?
    Yes, I think you can.

    Cheers,
    _

  3. The following user says thank you to anda_skoa for this useful post:

    canavaroski90 (10th February 2014)

  4. #3
    Join Date
    Jan 2014
    Posts
    12
    Thanks
    3
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Single server checking multiple client simultaneously - How to?

    Hi,

    Actually I see that I didn't ask 2 questions but 4 However thanks for replying all of them at once.

    These answers helped me a lot. Thank you very much.

Similar Threads

  1. Replies: 3
    Last Post: 11th December 2012, 20:48
  2. Replies: 1
    Last Post: 3rd January 2012, 21:15
  3. Painting in multiple QWidgets simultaneously
    By edepetete in forum Qt Programming
    Replies: 0
    Last Post: 17th October 2011, 17:21
  4. Replies: 7
    Last Post: 10th May 2010, 11:26
  5. tcp QT server - .Net c# client
    By soniaerm in forum Qt Programming
    Replies: 0
    Last Post: 21st April 2010, 22:15

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.