Skip to content

Instantly share code, notes, and snippets.

@danielkec
Created May 31, 2022 10:21
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 danielkec/1c04013ed62c68e5a74797a37c9827b8 to your computer and use it in GitHub Desktop.
Save danielkec/1c04013ed62c68e5a74797a37c9827b8 to your computer and use it in GitHub Desktop.
@ServerEndpoint("/ws/echo")
public class EchoEndpoint {
@OnMessage
public void onMessage(Session session, String message) throws Exception {
session.getBasicRemote().sendText("Did you send " + message + "?");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment