Package one.nio.net

Class NativeSslSocket

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, java.nio.channels.ByteChannel, java.nio.channels.Channel, java.nio.channels.ReadableByteChannel, java.nio.channels.WritableByteChannel

    class NativeSslSocket
    extends NativeSocket
    • Field Detail

      • ssl

        long ssl
      • isEarlyDataAccepted

        private volatile boolean isEarlyDataAccepted
      • isHandshakeDone

        private volatile boolean isHandshakeDone
    • Constructor Detail

      • NativeSslSocket

        NativeSslSocket​(int fd,
                        NativeSslContext context,
                        boolean serverMode)
                 throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.nio.channels.Channel
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class NativeSocket
      • handshake

        public void handshake()
                       throws java.io.IOException
        Overrides:
        handshake in class Socket
        Throws:
        java.io.IOException
      • writeRaw

        public int writeRaw​(long buf,
                            int count,
                            int flags)
                     throws java.io.IOException
        Overrides:
        writeRaw in class NativeSocket
        Throws:
        java.io.IOException
      • write

        public int write​(byte[] data,
                         int offset,
                         int count,
                         int flags)
                  throws java.io.IOException
        Overrides:
        write in class NativeSocket
        Throws:
        java.io.IOException
      • writeFully

        public void writeFully​(byte[] data,
                               int offset,
                               int count)
                        throws java.io.IOException
        Overrides:
        writeFully in class NativeSocket
        Throws:
        java.io.IOException
      • readRaw

        public int readRaw​(long buf,
                           int count,
                           int flags)
                    throws java.io.IOException
        Overrides:
        readRaw in class NativeSocket
        Throws:
        java.io.IOException
      • read

        public int read​(byte[] data,
                        int offset,
                        int count,
                        int flags)
                 throws java.io.IOException
        Overrides:
        read in class NativeSocket
        Throws:
        java.io.IOException
      • readFully

        public void readFully​(byte[] data,
                              int offset,
                              int count)
                       throws java.io.IOException
        Overrides:
        readFully in class NativeSocket
        Throws:
        java.io.IOException
      • sendFile0

        long sendFile0​(int sourceFD,
                       long offset,
                       long count)
                throws java.io.IOException
        Overrides:
        sendFile0 in class NativeSocket
        Throws:
        java.io.IOException
      • sslSessionEarlyDataAccepted

        private boolean sslSessionEarlyDataAccepted()
      • sslHandshakeDone

        private boolean sslHandshakeDone()
      • sslPeerCertificate

        private byte[] sslPeerCertificate()
      • sslPeerCertificateChain

        private java.lang.Object[] sslPeerCertificateChain()
      • sslCertName

        private java.lang.String sslCertName​(int which)
      • sslVerifyResult

        private java.lang.String sslVerifyResult()
      • sslSessionReused

        private boolean sslSessionReused()
      • sslSessionTicket

        private int sslSessionTicket()
      • sslCurrentCipher

        private java.lang.String sslCurrentCipher()
      • sslNew

        static long sslNew​(int fd,
                           long ctx,
                           boolean serverMode)
                    throws java.io.IOException
        Throws:
        java.io.IOException
      • sslFree

        static void sslFree​(long ssl)