Hi,
I'm trying to run the websockets example with undertow-core-1.0.0.Beta18
but it doesn't seem to work.
I simplified the code:
public class WebSocketServer {
public static void main(final String[] args) {
Undertow.builder().addListener(8080,
"localhost").setHandler(path().addPath("/myapp", websocket(new
WebSocketConnectionCallback() {
@Override
public void onConnect(WebSocketHttpExchange exchange,
WebSocketChannel channel) {
System.out.println("**** onConnect ********");
channel.getReceiveSetter().set(new
AbstractReceiveListener() {
@Override
protected void onFullTextMessage(WebSocketChannel
channel, BufferedTextMessage message) {
System.out.println("**** onFullTextMessage
********");
WebSockets.sendText(message.getData(), channel,
null);
}
});
}
}))).build().start();
}
}
Although the "OnConnect" handler is called, the "onFullTextMessage"
is
never called.
Do someone know why ?
Thanks
Eitan
Show replies by date