Added the socket code.