Re: CSocket question



Hi!
<recoil@xxxxxxxxxxxxxxxx> wrote in message
news:ED9F0EDB-8369-4535-9D36-AE944B43F34C@xxxxxxxxxxxxxxxx
It should also be noted Kevin that due to the nature of TCP and network
programming you should understand that easily 10-50% of the time you may
or
may not receive that 0 bytes signalling the disconnection of a socket.
What do you mean? You have to receive 0 if no peer or peer can't answer or
something wrong with a stack

If you
think that the performance or the reliability of the service you wish to
implement will be greatly affected negatively by this unreliability then
you
should implement a ping/pong method wherein you require that the client
send
you some pong data to notify that it is still connected.

Maybe pong is not good word here because word "ping" stand for
"Packet Internet Grouper" and have no connection to the game :)

Arkady


Hope this helps.

"Arkady Frenkel" wrote:

In your OnReceive() method you can Receive() function to read incoming
data.
If you receive 0 that mean no server against you . (WSA)GetLastError()
will
tell that exactly
Arkady


"Kevin Tang" <KevinTang@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:632B94FA-FF02-492C-83D2-22C7A4EFBBA9@xxxxxxxxxxxxxxxx
Hello,

I am using CSocket to create a client/server program in VC++ .Net 2003.

1) I have a question. After client program successful connect to server
program, how do the client side know the connection is still valid?

2) If the server program error or crash, it cannot close the socket.
How
the
client know the server is not avaliable ?

3) How to know if the physiscal connection is broken after client
connected
to server?

Thank you.
Kevin Tang.






.



Relevant Pages

  • Re: Connection lost at same time every hour (sometimes)
    ... After making the two following alterations on the server the problem seems ... After analyze your ipconfig on SBS and client, ... Then, other connection is good, ...
    (microsoft.public.windows.server.sbs)
  • Re: server disconnection - very often
    ... Reason of permanent popups is VMware server aplication on clients. ... Run CEICW to configure the network of SBS: ... Two network adapters - manual router connection to broadband ... Uninstall VMware on client. ...
    (microsoft.public.windows.server.sbs)
  • Re: Lan setup 2 nic
    ... The external nic only has TCP/IP enabled. ... Ipconfig of the server is looking good, but the client is still missing the ... > connection so we have a 2 nic with router setup now. ...
    (microsoft.public.windows.server.sbs)
  • Re: Regular disconnections from remote web workplace
    ... I can connect to office server and all office clients from home at all times ... be physically working right up until the connection is lost. ... If I enter http://companyip from a client I receive the login screen for the ... Click Services tab and select Hide All Microsoft Services and Disable ...
    (microsoft.public.windows.server.sbs)
  • [PATCH 0/5] [RFC] AF_RXRPC socket family implementation [try #3]
    ... These patches together supply secure client-side RxRPC connectivity as a Linux ... kernel socket family. ... presentation side is left to the client. ... Each connection goes to a particular "service". ...
    (Linux-Kernel)