Replacing SocketIO-client library by a custom socketIO class