Module aeonics.core

Interface Network.Server

  • All Superinterfaces:
    java.lang.AutoCloseable, java.io.Closeable
    Enclosing class:
    Network

    public static interface Network.Server
    extends java.io.Closeable
    This class represents a listening server connection ready to accept clients.

    The onAccept() callback will be called for each new accepted connection.

    Once and if the listening connection is closed, the onClose() callback will be called.

    You may call the Closeable.close() method to close the connection yourself.

    • Method Detail

      • onClose

        Callback<java.lang.Void,​Network.Server> onClose()
        Gets the callback object that will be called once the connection is closed.
        Returns:
        the onClose callback
      • isSecure

        boolean isSecure()
        Returns whether or not future accepted connections will be secure (typically using TLS or some other encryption mechanism)
        Returns:
        whether or not future accepted connections will be secure