Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abhirockzz/7c68d38ff2b17a95f2417150b1fe3152 to your computer and use it in GitHub Desktop.
Save abhirockzz/7c68d38ff2b17a95f2417150b1fe3152 to your computer and use it in GitHub Desktop.
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