CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2009
    Posts
    1

    Question multiple winsock control in a client app

    hi hope to get answers to my questions:

    i have an application that contains many winsock control say 30(actual is more)
    each winsock is binded to a different tcp port (from a pool of say 5000-8000)

    the 30 winsock controls connect to 30 physical devices each with a dedicated IP and listens for any request. the devices sends data and the application process it and sends response back.

    my questions:
    1. what are the possible problems in this design.
    2. during high volume traffic when devices(lots of transactions) the connection is sometimes lost. that is the device sends data but the application is no longer receiving it hence it will fail to do some transaction.

    im not sure where the problem is, but it looks like the application still assumes the current socket it is connected to is still working but its not.

    fyi:
    the application resets the winsock control( that is close the connection and connect again) in some period of time say every minute. this is to ensure connection is active.

    can you point me to some ideas that i can look and check.
    thanks a lot
    j_lopez

  2. #2
    Join Date
    May 2009
    Posts
    4

    Re: multiple winsock control in a client app

    If you will have more connections (100-1000) … I’d say look into IOCP client solution (utilize ConnectEx). No need to drop connection every minute (enable keep alive).

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured