I am so surprised to find that there is no close notification in socket
class. Like OnClose in MFC CAsyncSocket. Any suggestions please ......

Re: Socket close notification by Eugene

Eugene
Fri Nov 17 04:46:50 CST 2006

Hello!
You wrote on Fri, 17 Nov 2006 04:32:58 -0600:

MK> I am so surprised to find that there is no close notification in socket
MK> class. Like OnClose in MFC CAsyncSocket. Any suggestions please ......

In many cases there can be no notification until you attempt to read or
write (and the operation fails).
Also, as the sockets are synchronous, there's not much sense to make such
notification.

With best regards,
Eugene Mayevski
http://www.SecureBlackbox.com - the comprehensive component suite for
network security


Re: Socket close notification by Mubashir

Mubashir
Fri Nov 17 11:25:32 CST 2006

i am going to use the async methods ......
"Eugene Mayevski" <mayevski@eldos.com> wrote in message
news:uKJ$zWjCHHA.4680@TK2MSFTNGP04.phx.gbl...
> Hello!
> You wrote on Fri, 17 Nov 2006 04:32:58 -0600:
>
> MK> I am so surprised to find that there is no close notification in
> socket
> MK> class. Like OnClose in MFC CAsyncSocket. Any suggestions please ......
>
> In many cases there can be no notification until you attempt to read or
> write (and the operation fails).
> Also, as the sockets are synchronous, there's not much sense to make such
> notification.
>
> With best regards,
> Eugene Mayevski
> http://www.SecureBlackbox.com - the comprehensive component suite for
> network security



Re: Socket close notification by Peter

Peter
Fri Nov 17 11:57:46 CST 2006

"Mubashir Khan" <mubi@yahoo.com> wrote in message
news:ue5641mCHHA.4808@TK2MSFTNGP03.phx.gbl...
>i am going to use the async methods ......

I haven't actually done any socket stuff in .NET, but...don't you get the
end-receive notification, with a 0 value for the call to EndReceive, to
indicate closure of a socket?



Re: Socket close notification by William

William
Fri Nov 17 13:48:45 CST 2006

I was going to say the same thing. That is what I would do.

--
William Stacey [C# MVP]

"Peter Duniho" <NpOeStPeAdM@NnOwSlPiAnMk.com> wrote in message
news:12lru17nlpo8af1@corp.supernews.com...
| "Mubashir Khan" <mubi@yahoo.com> wrote in message
| news:ue5641mCHHA.4808@TK2MSFTNGP03.phx.gbl...
| >i am going to use the async methods ......
|
| I haven't actually done any socket stuff in .NET, but...don't you get the
| end-receive notification, with a 0 value for the call to EndReceive, to
| indicate closure of a socket?
|
|