public AbstractWebSocketConnection(EndPoint endp, Executor executor, Scheduler scheduler, WebSocketPolicy policy, ByteBufferPool bufferPool) { super(endp,executor,EXECUTE_ONFILLABLE); // TODO review if this is best. Specifically with MUX this.policy = policy; this.bufferPool = bufferPool; this.generator = new Generator(policy,bufferPool); this.parser = new Parser(policy,bufferPool); this.scheduler = scheduler; this.extensions = new ArrayList<>(); this.suspendToken = new AtomicBoolean(false); this.ioState = new IOState(); this.ioState.setState(ConnectionState.CONNECTING); this.writeBytes = new WriteBytesProvider(generator,new FlushCallback()); this.setInputBufferSize(policy.getInputBufferSize()); }
public AbstractWebSocketConnection(EndPoint endp, Executor executor, Scheduler scheduler, WebSocketPolicy policy, ByteBufferPool bufferPool) { super(endp,executor,EXECUTE_ONFILLABLE); // TODO review if this is best. Specifically with MUX this.policy = policy; this.bufferPool = bufferPool; this.generator = new Generator(policy,bufferPool); this.parser = new Parser(policy,bufferPool); this.scheduler = scheduler; this.extensions = new ArrayList<>(); this.suspendToken = new AtomicBoolean(false); this.ioState = new IOState(); this.ioState.setState(ConnectionState.CONNECTING); this.writeBytes = new WriteBytesProvider(generator,new FlushCallback()); this.setInputBufferSize(policy.getInputBufferSize()); }