package vs;

import java.io.IOException;

import jakarta.websocket.OnMessage;
import jakarta.websocket.Session;
import jakarta.websocket.server.ServerEndpoint;

@ServerEndpoint("/echo")
public class EchoServer {

	@OnMessage
	public void onMessage(Session s, String text) {
		try {
			s.getBasicRemote().sendText(text);
		} catch (IOException e) {
			e.printStackTrace(System.err);
		}
	}
}
