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

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -