Began adding event handlers to socket.