Added function addListener to the socketio object.