ruby mask code to make em-websocket support long-polling