Changed the signature of function socket.