[pure virtual]
Handle an event in the socket. This function is called when a event is occurred upon the socket.