Re: Strange server socket behaviour
- From: "Massimo" <barone@xxxxxxxxx>
- Date: Sat, 27 Jan 2007 19:51:31 +0100
"Mike Blake-Knox" <mikebk@xxxxxxxxxxxxx> ha scritto nel messaggio news:VA.000000a3.061bda9b@xxxxxxxxxxxxxxxx
I'm fearing this, too :-(
What shows up on the server console when you run your test? You are
writing some extra information onto the console.
My error-checking code catches the SocketException in Receive(), closes the new socket and discards the client connection. Then, it tries to do serversocket.BeginAccept() again... and this, too, throws an exception!
Also, it looks as if the code accepts a connection and waits for the
first data to be received before it re-primes the accept. I think I
know (from looking at logs from a server in an unfreindly environment)
that it is possible to get exceptions from an EndAccept(). Where is the
exception taken? The sample code doesn't include the try/catch code.
Because it was sample code :-)
In the actual code, every socket method call is checked for exceptions, of course.
Massimo
.
- References:
- Strange server socket behaviour
- From: Massimo
- Re: Strange server socket behaviour
- From: Kevin Spencer
- Re: Strange server socket behaviour
- From: Massimo
- Re: Strange server socket behaviour
- From: Barry Kelly
- Re: Strange server socket behaviour
- From: Massimo
- Re: Strange server socket behaviour
- From: Mike Blake-Knox
- Strange server socket behaviour
- Prev by Date: Re: intercepting the CLR
- Next by Date: Re: Strange server socket behaviour
- Previous by thread: Re: Strange server socket behaviour
- Next by thread: How to find out which ref-Variable is null, when exception is null reference
- Index(es):
Relevant Pages
|