websocket-like API implemented using HTTP in way that works the same in node and browsers