Re: CSocket question
- From: "Arkady Frenkel" <arkadyf@xxxxxxxxxxxxxxxx>
- Date: Tue, 23 May 2006 08:44:05 +0200
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 networkWhat do you mean? You have to receive 0 if no peer or peer can't answer or
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.
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.
.
- Follow-Ups:
- Re: CSocket question
- From: recoil@community.nospam
- Re: CSocket question
- References:
- Re: CSocket question
- From: Arkady Frenkel
- Re: CSocket question
- Prev by Date: While Developing Layered Service Providers(LSP)
- Next by Date: Re: While Developing Layered Service Providers(LSP)
- Previous by thread: Re: CSocket question
- Next by thread: Re: CSocket question
- Index(es):
Relevant Pages
|
|