1 package fi.iki.elonen.samples.echo; 2 3 import fi.iki.elonen.NanoWebSocketServer; 4 import fi.iki.elonen.WebSocket; 5 6 /** 7 * @author Paul S. Hawke (paul.hawke (at) gmail.com) 8 * On: 4/23/14 at 10:31 PM 9 */ 10 class DebugWebSocketServer extends NanoWebSocketServer { 11 private final boolean debug; 12 13 public DebugWebSocketServer(int port, boolean debug) { 14 super(port); 15 this.debug = debug; 16 } 17 18 @Override 19 public WebSocket openWebSocket(IHTTPSession handshake) { 20 return new DebugWebSocket(handshake, debug); 21 } 22 } 23