本文整理匯總了Java中io.netty.channel.PendingWriteQueue類的典型用法代碼示例。如果您正苦於以下問題:Java PendingWriteQueue類的具體用法?Java PendingWriteQueue怎麽用?Java PendingWriteQueue使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
PendingWriteQueue類屬於io.netty.channel包,在下文中一共展示了PendingWriteQueue類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: handlerAdded
import io.netty.channel.PendingWriteQueue; //導入依賴的package包/類
@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.
}
}
示例2: handlerAdded
import io.netty.channel.PendingWriteQueue; //導入依賴的package包/類
@Override
public void handlerAdded(final ChannelHandlerContext ctx) throws Exception {
this.ctx = ctx;
pendingUnencryptedWrites = new PendingWriteQueue(ctx);
if (ctx.channel().isActive() && engine.getUseClientMode()) {
// channelActive() event has been fired already, which means this.channelActive() will
// not be invoked. We have to initialize here instead.
handshake();
} else {
// channelActive() event has not been fired yet. this.channelOpen() will be invoked
// and initialization will occur there.
}
}