IWebSocketHandler echoHandler = new IWebSocketHandler() {
public void onConnect(IWebSocketConnection con) throws IOException, UnsupportedProtocolException {
if ((con.getProtocol() == null) || !con.getProtocol().equalsIgnoreCase("com.example.echo")) {
throw new UnsupportedProtocolException("protocol " + con.getProtocol() + " is not supported (supported: com.example.echo)");
}
}
public void onDisconnect(IWebSocketConnection con) throws IOException {
}