Works with websockets