public class SslAsynchronousSocketChannel extends AsynchronousSocketChannelProxy
| 限定符和类型 | 字段和说明 |
|---|---|
private int |
adaptiveWriteSize
自适应的输出长度
|
private cn.starboot.socket.utils.pool.memory.MemoryUnit |
appReadBuffer |
private boolean |
handshake |
private HandshakeModel |
handshakeModel
完成握手置null
|
private static org.slf4j.Logger |
LOGGER |
private cn.starboot.socket.utils.pool.memory.MemoryUnit |
netReadBuffer |
private cn.starboot.socket.utils.pool.memory.MemoryUnit |
netWriteBuffer |
private SSLEngine |
sslEngine |
private SslService |
sslService
完成握手置null
|
asynchronousSocketChannel| 构造器和说明 |
|---|
SslAsynchronousSocketChannel(AsynchronousSocketChannel asynchronousSocketChannel,
SslService sslService,
cn.starboot.socket.utils.pool.memory.MemoryBlock memoryBlock) |
| 限定符和类型 | 方法和说明 |
|---|---|
private void |
checkInitialized()
校验是否已完成初始化,如果还处于Handshake阶段则阻塞当前线程
|
void |
close() |
private SSLEngineResult.Status |
doUnWrap(ByteBuffer netBuffer,
ByteBuffer appBuffer) |
private void |
doWrap(ByteBuffer writeBuffer) |
Future<Integer> |
read(ByteBuffer dst) |
<A> void |
read(ByteBuffer[] dsts,
int offset,
int length,
long timeout,
TimeUnit unit,
A attachment,
CompletionHandler<Long,? super A> handler) |
<A> void |
read(ByteBuffer dst,
long timeout,
TimeUnit unit,
A attachment,
CompletionHandler<Integer,? super A> handler) |
Future<Integer> |
write(ByteBuffer src) |
<A> void |
write(ByteBuffer[] srcs,
int offset,
int length,
long timeout,
TimeUnit unit,
A attachment,
CompletionHandler<Long,? super A> handler) |
<A> void |
write(ByteBuffer src,
long timeout,
TimeUnit unit,
A attachment,
CompletionHandler<Integer,? super A> handler) |
bind, connect, connect, getLocalAddress, getOption, getRemoteAddress, isOpen, setOption, shutdownInput, shutdownOutput, supportedOptionsprivate static final org.slf4j.Logger LOGGER
private final cn.starboot.socket.utils.pool.memory.MemoryUnit netWriteBuffer
private final cn.starboot.socket.utils.pool.memory.MemoryUnit netReadBuffer
private final cn.starboot.socket.utils.pool.memory.MemoryUnit appReadBuffer
private SSLEngine sslEngine
private HandshakeModel handshakeModel
private final SslService sslService
private boolean handshake
private int adaptiveWriteSize
public SslAsynchronousSocketChannel(AsynchronousSocketChannel asynchronousSocketChannel, SslService sslService, cn.starboot.socket.utils.pool.memory.MemoryBlock memoryBlock)
public <A> void read(ByteBuffer dst, long timeout, TimeUnit unit, A attachment, CompletionHandler<Integer,? super A> handler)
read 在类中 AsynchronousSocketChannelProxyprivate SSLEngineResult.Status doUnWrap(ByteBuffer netBuffer, ByteBuffer appBuffer)
public Future<Integer> read(ByteBuffer dst)
read 在接口中 AsynchronousByteChannelread 在类中 AsynchronousSocketChannelProxypublic <A> void read(ByteBuffer[] dsts, int offset, int length, long timeout, TimeUnit unit, A attachment, CompletionHandler<Long,? super A> handler)
read 在类中 AsynchronousSocketChannelProxypublic <A> void write(ByteBuffer src, long timeout, TimeUnit unit, A attachment, CompletionHandler<Integer,? super A> handler)
write 在类中 AsynchronousSocketChannelProxyprivate void checkInitialized()
private void doWrap(ByteBuffer writeBuffer) throws SSLException
SSLExceptionpublic Future<Integer> write(ByteBuffer src)
write 在接口中 AsynchronousByteChannelwrite 在类中 AsynchronousSocketChannelProxypublic <A> void write(ByteBuffer[] srcs, int offset, int length, long timeout, TimeUnit unit, A attachment, CompletionHandler<Long,? super A> handler)
write 在类中 AsynchronousSocketChannelProxypublic void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableclose 在接口中 AsynchronousChannelclose 在接口中 Channelclose 在类中 AsynchronousSocketChannelProxyIOExceptionCopyright © 2023. All rights reserved.