Results 1 to 4 of 4

Thread: Winsock !!! Interesting and Major Issue

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2001
    Location
    india
    Posts
    8

    Question Winsock !!! Interesting and Major Issue

    Hello all of u,
    I developed Visual Basic client application which connects to JAVA Server using TCP socket. I m using wireless modem for internet connectivity. I m having 2 questions as follows.


    1) If i remove modem directally , socket still shows status as connected and sends data to server the server ( Actually server machine is not avaliable) and no error is raised

    2) If i plug off LAN cable , still the same is happening.

    How can i identify these 2 things. There is one way i know but this is not a feasible solution, I can ping server computer after some time duration to check status of server. But In some cases Ping may be disable on the Server Computer.

    What do u think



    Milind

  2. #2
    PowerPoster
    Join Date
    Feb 2002
    Location
    Canada, Toronto
    Posts
    5,803

    Re: Winsock !!! Interesting and Major Issue

    So the Close or Error event don't fire ?

  3. #3
    Frenzied Member
    Join Date
    Aug 2000
    Location
    O!
    Posts
    1,177

    Re: Winsock !!! Interesting and Major Issue

    If there is the chance that ping may not be available, use heartbeat messages or, in your case you may want to have the server acknowledge the message from the client.

    If the client doesn't get a response to either type of message (heartbeat or data) then it can assume that the connection has been broken and take whatever steps are necessary to recover.

  4. #4

    Thread Starter
    New Member
    Join Date
    May 2001
    Location
    india
    Posts
    8

    Re: Winsock !!! Interesting and Major Issue

    Hello CCODER,
    It solve my problem. I m sending Alive message to the server after some time duration say after each 10 sec and for the same server replies Yes. I found some important information about this. I got the explanation for this from following WEB.

    http://tangentsoft.net/wskfaq/newbie.html

    See following article :

    2.12 - How do I detect when my TCP connection is closed?


    Thanks CCODER



    Regards
    Milind

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