c# - In which scenario would EndSend receive a SocketException? -


according msdn socket.endsend method can throw socketexception socket using connection-orientated protocol. when ?

i tested couple of scenarios , none threw socketexception.

scenario 1: app calls beginsend, , while it's sending data, app calls begindisconnect/disconnect
result: socket doesn't send fin until data sent, , endsend successful.

scenario 2: app calls beginsend, , while it's sending data, socket receives rst remote endpoint.
result: socket stops sending data, calls callback , endsend successful reporting bytes have been sent. don't understand why ?

when socket.endsend method throw socketexception on connection-orientated protocol ?

i know raise error if connection severed (as opposed orderly shut down). should able reproduce behavior pulling network cable. if can't, please post code.


Comments

Popular posts from this blog

c# - Unity IoC Lifetime per HttpRequest for UserStore -

Change the color of an oval at click in Java AWT -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -