io.netty.channel.PendingWriteQueue Java Examples
The following examples show how to use
io.netty.channel.PendingWriteQueue.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ProxyHandler.java From netty-4.1.22 with Apache License 2.0 | 5 votes |
private void addPendingWrite(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) { PendingWriteQueue pendingWrites = this.pendingWrites; if (pendingWrites == null) { this.pendingWrites = pendingWrites = new PendingWriteQueue(ctx); } pendingWrites.add(msg, promise); }
Example #2
Source File: SslHandler.java From netty4.0.27Learn with Apache License 2.0 | 5 votes |
@Override public void handlerAdded(final ChannelHandlerContext ctx) throws Exception { this.ctx = ctx; pendingUnencryptedWrites = new PendingWriteQueue(ctx); if (ctx.channel().isActive() && engine.getUseClientMode()) { // Begin the initial handshake. // channelActive() event has been fired already, which means this.channelActive() will // not be invoked. We have to initialize here instead. handshake(null); } else { // channelActive() event has not been fired yet. this.channelOpen() will be invoked // and initialization will occur there. } }