Template for a custom socket that implements java.net.Socket.