Added function to check for a connection termination exception. Upgraded socket.recv and socket.send to use it.
Added function to check for a connection termination exception. Upgraded socket.recv and socket.send to use it.

sburnett/seattle,sburnett/seattle,sburnett/seattle,sburnett/seattle,sburnett/seattle,sburnett/seattle