Featured post
c# - signal sent when stream is closed -
i have client-server app , observed (in local environment i.e. lan ) when close stream connects client server @ 1 end, @ other end observable ( i.e. if in client close stream connects client server, @ other end, @ server, noticeable , reported exception in try-catch block surrounds server-stream code ) .
how possible ? client/server send specific code stream closed before closing stream ? applicable in wider networks ( big wans ) ?
the bigger question when close stream @ 1 end, can rely on fact @ other end noticed , in consequence close thread , not wait endless recieve data never come due fact that stream closed ?
the maximum distance between client , server 700 km ( don't know if plays role mentioned in case )
thanks !
in tcp, connection shutdown procedure involves sending additional datagrams other side, each side notice connection orderly shut down.
relying on has 1 major pitfall: in case of unorderly shutdown (e.g. physical disconnect of network cable), no notification sent. there "keepalive" feature in tcp other end regularly ping whether connection still alive, not practical frequency of pings low (order of hours). if "most" connections see orderly shutdown (which includes client application crashes long system keeps running), relying on shutdown notifications reasonable. server software typically puts timeout every connection on safe side.
- Get link
- X
- Other Apps
Comments
Post a Comment