Implemented handlers for our socket events