!include once #1015699 // websocket svoid webSocketTest(S url) ctex { print("Connecting to " + url); WebSocketClient client = new(new URI(url)) { public void onMessage(S s) { print("Received: " + s); } public void onOpen(ServerHandshake handshake) { print("WebSocket opened"); } public void onClose(int code, S reason, bool remote) { print("WebSocket closed"); } public void onError(Exception e) { printStackTrace(e); } }; client.connect(); afterwards { client.close(); } sleepSeconds(60); }