Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-dev] question about websocket of jetty 9

Hi ,
i am now developing a web based chat room using jetty 9 .what i know is we should override config method to configure our own websocket class to websocketfactory :


@Override
public void configure(WebSocketServletFactory factory) {
// TODO Auto-generated method stub

factory.register(ChartSocket.class);

}


and i also know that if the client send message to server, it will be forwared to onWebSocketText() method.

my question is :

it seems the message will be forwarded to the corresponding websocket object . if i also want to notify other clients. how to pass the message to other websocket objects. for example. if someone in the chat room send a message to the server, all other users will receive the message.



thanks

Back to the top