Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Embedded Websocket client using Tyrus JDK container
public class WebsocketClientOnVaniallJDKRunner {
public static void main(String[] args) throws DeploymentException, IOException, InterruptedException {
WebSocketContainer cc = ContainerProvider.getWebSocketContainer();
Session connectToServer = cc.connectToServer(WebsocketAnotatedClient.class, URI.create("ws://localhost:8080/testwsep"));
new CountDownLatch(1).await();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment