Class JavaSslClientSocket
java.lang.Object
one.nio.net.Socket
one.nio.net.JavaSslClientSocket
- All Implemented Interfaces:
Closeable, AutoCloseable, ByteChannel, Channel, ReadableByteChannel, WritableByteChannel
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ReadableByteChannelprivate InputStreamprivate WritableByteChannelprivate OutputStreamprivate final SSLSocketprivate final JavaSslClientContextFields 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()voidbind(InetAddress address, int port, int backlog) voidclose()voidconnect(InetAddress address, int port) booleanbooleanbooleanbyte[]getOption(int level, int option) intbooleanbooleanint<T> TgetSslOption(SslOption<T> option) booleanintintgetTos()booleanbooleanisOpen()voidlisten(int backlog) intread(byte[] data, int offset, int count, int flags) intread(ByteBuffer dst) voidreadFully(byte[] data, int offset, int count) intreadRaw(long buf, int count, int flags) recv(ByteBuffer dst, int flags) intintsend(ByteBuffer src, int flags, InetAddress address, int port) longsendFile(RandomAccessFile file, long offset, long count) intvoidsetBlocking(boolean blocking) voidsetDeferAccept(boolean deferAccept) voidsetKeepAlive(boolean keepAlive) voidsetNoDelay(boolean noDelay) booleansetOption(int level, int option, byte[] value) voidsetRecvBuffer(int recvBuf) voidsetReuseAddr(boolean reuseAddr, boolean reusePort) voidsetSendBuffer(int sendBuf) voidsetTcpFastOpen(boolean tcpFastOpen) voidsetTimeout(int timeout) voidsetTos(int tos) sslWrap(SslContext context) intwrite(byte[] data, int offset, int count, int flags) intwrite(ByteBuffer src) voidwriteFully(byte[] data, int offset, int count) intwriteRaw(long buf, int count, int flags) Methods inherited from class Socket
acceptNonBlocking, bind, bindInet, bindUnix, connect, connectInet, connectUnix, create, createClientSocket, createClientSocket, createDatagramSocket, createServerSocket, createUnixSocket, fromFD, getNotsentLowat, getThinLinearTimeouts, handshake, read, send, setNotsentLowat, setThinLinearTimeouts, write
-
Field Details
-
socket
-
sslContext
-
outCh
-
inCh
-
outputStream
-
inputStream
-
-
Constructor Details
-
JavaSslClientSocket
-
-
Method Details
-
isOpen
-
close
-
accept
- Specified by:
acceptin classSocket- Throws:
IOException
-
connect
- Specified by:
connectin classSocket- Throws:
IOException
-
bind
- Specified by:
bindin classSocket- Throws:
IOException
-
writeRaw
- Specified by:
writeRawin classSocket- Throws:
IOException
-
write
- Specified by:
writein classSocket- Throws:
IOException
-
writeFully
- Specified by:
writeFullyin classSocket- Throws:
IOException
-
send
- Specified by:
sendin classSocket- Throws:
IOException
-
readRaw
- Specified by:
readRawin classSocket- Throws:
IOException
-
read
- Specified by:
readin classSocket- Throws:
IOException
-
readFully
- Specified by:
readFullyin classSocket- Throws:
IOException
-
sendFile
- Specified by:
sendFilein classSocket- Throws:
IOException
-
recv
-
sendMsg
-
recvMsg
- Specified by:
recvMsgin classSocket- Throws:
IOException
-
setBlocking
public void setBlocking(boolean blocking) - Specified by:
setBlockingin classSocket
-
isBlocking
public boolean isBlocking()- Specified by:
isBlockingin classSocket
-
setTimeout
public void setTimeout(int timeout) - Specified by:
setTimeoutin classSocket
-
getTimeout
public int getTimeout()- Specified by:
getTimeoutin classSocket
-
setKeepAlive
public void setKeepAlive(boolean keepAlive) - Specified by:
setKeepAlivein classSocket
-
getKeepAlive
public boolean getKeepAlive()- Specified by:
getKeepAlivein classSocket
-
setNoDelay
public void setNoDelay(boolean noDelay) - Specified by:
setNoDelayin classSocket
-
getNoDelay
public boolean getNoDelay()- Specified by:
getNoDelayin classSocket
-
setTcpFastOpen
public void setTcpFastOpen(boolean tcpFastOpen) - Specified by:
setTcpFastOpenin classSocket
-
getTcpFastOpen
public boolean getTcpFastOpen()- Specified by:
getTcpFastOpenin classSocket
-
setDeferAccept
public void setDeferAccept(boolean deferAccept) - Specified by:
setDeferAcceptin classSocket
-
getDeferAccept
public boolean getDeferAccept()- Specified by:
getDeferAcceptin classSocket
-
setReuseAddr
public void setReuseAddr(boolean reuseAddr, boolean reusePort) - Specified by:
setReuseAddrin classSocket
-
getReuseAddr
public boolean getReuseAddr()- Specified by:
getReuseAddrin classSocket
-
getReusePort
public boolean getReusePort()- Specified by:
getReusePortin classSocket
-
setRecvBuffer
public void setRecvBuffer(int recvBuf) - Specified by:
setRecvBufferin classSocket
-
getRecvBuffer
public int getRecvBuffer()- Specified by:
getRecvBufferin classSocket
-
setSendBuffer
public void setSendBuffer(int sendBuf) - Specified by:
setSendBufferin classSocket
-
getSendBuffer
public int getSendBuffer()- Specified by:
getSendBufferin classSocket
-
setTos
-
getTos
-
getOption
-
setOption
-
getLocalAddress
- Specified by:
getLocalAddressin classSocket
-
getRemoteAddress
- Specified by:
getRemoteAddressin classSocket
-
sslWrap
-
read
- Throws:
IOException
-
write
- Throws:
IOException
-
sslUnwrap
-
getSslContext
- Specified by:
getSslContextin classSocket
-
getSslOption
- Specified by:
getSslOptionin classSocket
-
listen
- Specified by:
listenin classSocket- Throws:
IOException
-