{"id":55113,"library":"java-websocket","title":"Java-WebSocket","description":"A lightweight WebSocket client and server implementation written entirely in Java, supporting RFC 6455.","status":"active","version":"1.6.0","language":"java","source_language":null,"source_url":"https://github.com/TooTallNate/Java-WebSocket","tags":["websocket","client","server","real-time","networking"],"install":[{"cmd":"<dependency>\n  <groupId>org.java-websocket</groupId>\n  <artifactId>Java-WebSocket</artifactId>\n  <version>1.6.0</version>\n</dependency>","lang":"xml","label":"Maven"},{"cmd":"implementation 'org.java-websocket:Java-WebSocket:1.6.0'","lang":"groovy","label":"Gradle"}],"dependencies":[],"imports":[{"symbol":"WebSocketClient","correct":"org.java_websocket.client.WebSocketClient"}],"quickstart":{"code":"import org.java_websocket.client.WebSocketClient;\nimport org.java_websocket.handshake.ServerHandshake;\nimport java.net.URI;\n\npublic class Quickstart {\n    public static void main(String[] args) throws Exception {\n        URI uri = new URI(\"ws://echo.websocket.org\");\n        WebSocketClient client = new WebSocketClient(uri) {\n            @Override\n            public void onOpen(ServerHandshake handshakedata) {\n                System.out.println(\"Connected\");\n            }\n            @Override\n            public void onMessage(String message) {\n                System.out.println(\"Received: \" + message);\n            }\n            @Override\n            public void onClose(int code, String reason, boolean remote) {\n                System.out.println(\"Disconnected\");\n            }\n            @Override\n            public void onError(Exception ex) {\n                ex.printStackTrace();\n            }\n        };\n        client.connect();\n    }\n}","lang":"java","description":"Connects to a WebSocket server and handles events."},"warnings":[],"env_vars":null,"search_vec":"'6455':17 'client':7,19 'entir':12 'implement':10 'java':2,14 'java-websocket':1 'lightweight':5 'network':24 'real':22 'real-tim':21 'rfc':16 'server':9,20 'support':15 'time':23 'websocket':3,6,18 'written':11","created_at":"2026-06-15T09:37:23.446228+00:00","updated_at":"2026-06-15T09:37:23.446228+00:00","problems":[],"ecosystem":"maven","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/TooTallNate/Java-WebSocket","github":"https://github.com/TooTallNate/Java-WebSocket","docs":"https://appdoc.app/artifact/org.java-websocket/Java-WebSocket/","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["networking"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-15","next_check":"2026-12-12","install_tag":null}}