Updated docstring. Made socket exceptions more specific. Updated docs