Add callbacks support to WebSockets