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

Thread: winsock

  1. #1
    Join Date
    Jul 2001
    Posts
    4

    winsock

    I have a client side program when after logging in it opens a winsock connection to a serverside program letting it know it's online. the problem is if the client side computer crashes and has to be rebooted before the log off procedure ends the session then i get an error and the client side program cannot connect again unless the server side program is restarted. Please help


  2. #2
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477

    Re: winsock

    You should always check to see if a client is alive at periodically moments (like every minute, or every 5 minutes). Just let the server send a bogus command (like PING or so), and have the client reply. If the client doesn't reply withing a time given (like 1 minute), start the logoff procedure for that client.

    Tom Cannaerts
    [email protected]

    Programming today is a race between software engineers striving to build bigger and better idot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
    Tom Cannaerts
    email: [email protected]
    www.tom.be (dutch site)

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