Results 1 to 3 of 3

Thread: Winsock Re-Listen *Resolved*

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2003
    Posts
    79

    Winsock Re-Listen *Resolved*

    Ok lets say I have a server application, which is listening. I also have a client application that connects. If I was connected, and connection was some how lost, I want the server to listen again. I dont think using Winsock_Error would work because There would be no error unless it was in the middle of sending or recieving data. I guess I could use a timer that sends a command every 5 seconds or so, but maybe theres a way around using a timer?
    Last edited by Bow-Viper1; Feb 25th, 2003 at 09:10 PM.

  2. #2
    Addicted Member TheSarlacc's Avatar
    Join Date
    Aug 2002
    Location
    Somewhere close
    Posts
    185
    the two events, Winsock_Error and Winsock_Close are the best way to do this. when the connection is terminated, one of the two events will fire without fail, so all you have to do is put the same re-listen code under each event and that should do the trick.
    note: both events never fire together. its one or the other, thats why its a stable way to get the control to re-listen.
    Get Quoted:

    "If Shane Warne had given his mobile phone to Russell Crowe, neither of them would be in trouble."
    "She has more troubles than a centipede with its legs crossed."
    "For every action, there is an equal and opposite Government program."


  3. #3

    Thread Starter
    Lively Member
    Join Date
    Feb 2003
    Posts
    79
    Ohh I see, thanks alot man.

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