Registry / networking / java-websocket

java-websocket

JSON →
library1.6.0javamavenunverified

A lightweight WebSocket client and server implementation written entirely in Java, supporting RFC 6455.

<dependency> <groupId>org.java-websocket</groupId> <artifactId>Java-WebSocket</artifactId> <version>1.6.0</version> </dependency>
INSTALL
IMPORT
SIG · JAVA-WEBSOCKET
J
java-websocket
networkingjavav1.6.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

WebSocketClient
org.java_websocket.client.WebSocketClient

Connects to a WebSocket server and handles events.

import org.java_websocket.client.WebSocketClient; import org.java_websocket.handshake.ServerHandshake; import java.net.URI; public class Quickstart { public static void main(String[] args) throws Exception { URI uri = new URI("ws://echo.websocket.org"); WebSocketClient client = new WebSocketClient(uri) { @Override public void onOpen(ServerHandshake handshakedata) { System.out.println("Connected"); } @Override public void onMessage(String message) { System.out.println("Received: " + message); } @Override public void onClose(int code, String reason, boolean remote) { System.out.println("Disconnected"); } @Override public void onError(Exception ex) { ex.printStackTrace(); } }; client.connect(); } }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.6.0latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
10
Resources
java-websocket — mvn dependency:get java-websocket · libregistry