Package naga
Interface NIOSocketSSL
- All Superinterfaces:
NIOAbstractSocket,NIOSocket
Interface for a SSL Socket
- Author:
- Christoffer Lerno
-
Method Summary
Modifier and TypeMethodDescriptionvoidInitiates SSL-handshake, starts encrypted communication.Returns the SSLEngine in use for this socket.booleanMethods inherited from interface naga.NIOAbstractSocket
close, getAddress, getIp, getPort, getTag, isOpen, setTagMethods inherited from interface naga.NIOSocket
closeAfterWrite, getBytesRead, getBytesWritten, getMaxQueueSize, getTimeOpen, getWriteQueueSize, listen, queue, setMaxQueueSize, setPacketReader, setPacketWriter, socket, write, write
-
Method Details
-
getSSLEngine
SSLEngine getSSLEngine()Returns the SSLEngine in use for this socket.- Returns:
- an SSLEngine.
-
beginHandshake
Initiates SSL-handshake, starts encrypted communication.- Throws:
SSLException- if the handshake fails
-
isEncrypted
boolean isEncrypted()- Returns:
- true if handshake is initiated and consequent data will be encrypted.
-