title: signal sent when stream is closed
body: <p>I have a client-server app and i observed that (in a local environment i.e. LAN ) when i close the stream that connects the client to the server  at one end, at the other end it is observable ( i.e. if in my client i close the stream that connects the client to the server, at the other end, at the server, it is noticeable and it is reported as an Exception in the try-catch block that surrounds my server-stream code ) . </p>
  
  <p>How is it possible ? Does the client/server send a specific code that the stream is closed just before closing the stream ? Is it applicable also in wider networks ( like big WANs ) ? </p>
  
  <p>The bigger question is that when i close a stream at one end, can i rely on the fact that at the other end it will be noticed and in consequence close that thread and not just wait endless to recieve data that will never come due to the fact that that stream is closed ? </p>
  
  <p>The maximum distance between a client and a server is 700 km ( i don't know if it plays a role but i mentioned it just in case )</p>
  
  <p>Thanks !</p>