Class NativeSslSocket
java.lang.Object
one.nio.net.Socket
one.nio.net.NativeSocket
one.nio.net.NativeSslSocket
- All Implemented Interfaces:
Closeable, AutoCloseable, ByteChannel, Channel, ReadableByteChannel, WritableByteChannel
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) NativeSslContextprivate booleanprivate boolean(package private) longFields inherited from class NativeSocket
fdFields inherited from class Socket
AF_INET, AF_INET6, AF_UNIX, IPTOS_LOWDELAY, IPTOS_MINCOST, IPTOS_RELIABILITY, IPTOS_THROUGHPUT, MSG_DONTROUTE, MSG_DONTWAIT, MSG_MORE, MSG_OOB, MSG_PEEK, MSG_TRUNC, MSG_WAITALL, NO_PORT, SO_BROADCAST, SO_BSDCOMPAT, SO_DEBUG, SO_DONTROUTE, SO_ERROR, SO_KEEPALIVE, SO_LINGER, SO_NO_CHECK, SO_OOBINLINE, SO_PASSCRED, SO_PEERCRED, SO_PRIORITY, SO_RCVBUF, SO_RCVLOWAT, SO_RCVTIMEO, SO_REUSEADDR, SO_REUSEPORT, SO_SNDBUF, SO_SNDLOWAT, SO_SNDTIMEO, SO_TYPE, SOCK_DGRAM, SOCK_RAW, SOCK_RDM, SOCK_SEQPACKET, SOCK_STREAM, SOL_IP, SOL_IPV6, SOL_SOCKET, SOL_TCP, SOL_UDP, TCP_CONGESTION, TCP_CORK, TCP_DEFER_ACCEPT, TCP_INFO, TCP_KEEPCNT, TCP_KEEPIDLE, TCP_KEEPINTVL, TCP_LINGER2, TCP_MAXSEG, TCP_NODELAY, TCP_QUICKACK, TCP_SYNCNT, TCP_USER_TIMEOUT, TCP_WINDOW_CLAMP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccept()voidclose()getSslOption(SslOption option) voidintread(byte[] data, int offset, int count, int flags) voidreadFully(byte[] data, int offset, int count) intreadRaw(long buf, int count, int flags) (package private) longsendFile0(int sourceFD, long offset, long count) private StringsslCertName(int which) private String(package private) static voidsslFree(long ssl) private boolean(package private) static longsslNew(int fd, long ctx, boolean serverMode) private byte[]private Object[]private booleanprivate booleanprivate intprivate Stringintwrite(byte[] data, int offset, int count, int flags) voidwriteFully(byte[] data, int offset, int count) intwriteRaw(long buf, int count, int flags) Methods inherited from class NativeSocket
accept0, bind, bind, bind0, connect, connect, connect0, getDeferAccept, getKeepAlive, getLocalAddress, getNoDelay, getNotsentLowat, getOption, getRecvBuffer, getRemoteAddress, getReuseAddr, getReusePort, getSendBuffer, getTcpFastOpen, getThinLinearTimeouts, getTimeout, getTos, isBlocking, isOpen, listen, read, recv, recvFrom0, recvFrom1, recvMsg, recvMsg0, send, send, sendFile, sendMsg, sendMsg0, sendTo0, sendTo1, setBlocking, setDeferAccept, setKeepAlive, setNoDelay, setNotsentLowat, setOption, setRecvBuffer, setReuseAddr, setSendBuffer, setTcpFastOpen, setThinLinearTimeouts, setTimeout, setTos, sslWrap, toNativeAddr, writeMethods inherited from class Socket
bindInet, bindUnix, connectInet, connectUnix, create, createClientSocket, createClientSocket, createDatagramSocket, createServerSocket, createUnixSocket, fromFD, read, write
-
Field Details
-
context
NativeSslContext context -
ssl
long ssl -
isEarlyDataAccepted
private volatile boolean isEarlyDataAccepted -
isHandshakeDone
private volatile boolean isHandshakeDone
-
-
Constructor Details
-
NativeSslSocket
NativeSslSocket(int fd, NativeSslContext context, boolean serverMode) throws IOException - Throws:
IOException
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceChannel- Specified by:
closein interfaceCloseable- Overrides:
closein classNativeSocket
-
accept
- Overrides:
acceptin classNativeSocket- Throws:
IOException
-
acceptNonBlocking
- Overrides:
acceptNonBlockingin classNativeSocket- Throws:
IOException
-
sslUnwrap
- Overrides:
sslUnwrapin classNativeSocket
-
getSslContext
- Overrides:
getSslContextin classNativeSocket
-
getSslOption
- Overrides:
getSslOptionin classNativeSocket
-
handshake
- Overrides:
handshakein classSocket- Throws:
IOException
-
writeRaw
- Overrides:
writeRawin classNativeSocket- Throws:
IOException
-
write
- Overrides:
writein classNativeSocket- Throws:
IOException
-
writeFully
- Overrides:
writeFullyin classNativeSocket- Throws:
IOException
-
readRaw
- Overrides:
readRawin classNativeSocket- Throws:
IOException
-
read
- Overrides:
readin classNativeSocket- Throws:
IOException
-
readFully
- Overrides:
readFullyin classNativeSocket- Throws:
IOException
-
sendFile0
- Overrides:
sendFile0in classNativeSocket- Throws:
IOException
-
sslSessionEarlyDataAccepted
private boolean sslSessionEarlyDataAccepted() -
sslHandshakeDone
private boolean sslHandshakeDone() -
sslPeerCertificate
private byte[] sslPeerCertificate() -
sslPeerCertificateChain
-
sslCertName
-
sslVerifyResult
-
sslSessionReused
private boolean sslSessionReused() -
sslSessionTicket
private int sslSessionTicket() -
sslCurrentCipher
-
sslNew
- Throws:
IOException
-
sslFree
static void sslFree(long ssl)
-