Uses 115K of libraries. Click here for Pure Java version (949L/7K/24K).
!7 lib 1014685 // websocket import org.java_websocket.client.WebSocketClient; import org.java_websocket.handshake.ServerHandshake; p { WebSocketClient client = new WebSocketClient(new URI("ws://butter.botcompany.de:8080/1014677")) { public void onMessage( String message ) { print("message from server: " + message); } public void onOpen( ServerHandshake handshake ) { print("opened connection"); } public void onClose(int code, S reason, bool remote) { print("closed connection"); } public void onError(Exception e) { printStackTrace(e); } }; assertTrue("connect", client.connectBlocking()); }
Began life as a copy of #1009221
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1014686 |
Snippet name: | WebSocket Client Test 2 (OK, but no auto-reconnect) |
Eternal ID of this version: | #1014686/3 |
Text MD5: | 09c00b534b57cb1ba18e91a5f275f6fb |
Transpilation MD5: | 482661c301421ce0c32ec3eaa9de7c5b |
Author: | stefan |
Category: | javax |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-04-30 01:19:26 |
Source code size: | 692 bytes / 28 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 388 / 494 |
Version history: | 2 change(s) |
Referenced in: | #1015080 - Reproduce Web Socket Null Byte Bug |