Added simple server and client.  Optimized __exit__.

Added simple server and client.  Optimized __exit__.