NIOSocketSSL (Naga API)
Date: 2016-06-28

naga

## Interface NIOSocketSSL

- All Superinterfaces:
    NIOAbstractSocket, NIOSocket

      public interface NIOSocketSSL
      extends NIOSocket

  Interface for a SSL Socket
  Author:
    Christoffer Lerno

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `beginHandshake()` Initiates SSL-handshake, starts encrypted communication.
    `javax.net.ssl.SSLEngine` | `getSSLEngine()` Returns the SSLEngine in use for this socket.
    `boolean` | `isEncrypted()`

    - ### Methods inherited from interface naga.NIOSocket

      `closeAfterWrite, getBytesRead, getBytesWritten, getMaxQueueSize, getTimeOpen, getWriteQueueSize, listen, queue, setMaxQueueSize, setPacketReader, setPacketWriter, socket, write, write`

    - ### Methods inherited from interface naga.NIOAbstractSocket

      `close, getAddress, getIp, getPort, getTag, isOpen, setTag`

- - ### Method Detail

    - #### getSSLEngine

          javax.net.ssl.SSLEngine getSSLEngine()

      Returns the SSLEngine in use for this socket.
      Returns:
        an SSLEngine.

    - #### beginHandshake

          void beginHandshake()
                              throws javax.net.ssl.SSLException

      Initiates SSL-handshake, starts encrypted communication.
      Throws:
        `javax.net.ssl.SSLException`

    - #### isEncrypted

          boolean isEncrypted()

      Returns:
        true if handshake is initiated and consequent data will be encrypted.