Interface SocketAcceptor

    • Method Detail

      • getLocalAddress

        java.net.InetSocketAddress getLocalAddress()
        Description copied from interface: IoAcceptor
        Returns the local address which is bound currently. If more than one address are bound, only one of them will be returned, but it's not necessarily the firstly bound address.
        Specified by:
        getLocalAddress in interface IoAcceptor
        Returns:
        the local InetSocketAddress which is bound currently. If more than one address are bound, only one of them will be returned, but it's not necessarily the firstly bound address. This method overrides the IoAcceptor.getLocalAddress() method.
      • getDefaultLocalAddress

        java.net.InetSocketAddress getDefaultLocalAddress()
        Description copied from interface: IoAcceptor
        Returns the default local address to bind when no argument is specified in IoAcceptor.bind() method. Please note that the default will not be used if any local address is specified. If more than one address are set, only one of them will be returned, but it's not necessarily the firstly specified address in IoAcceptor.setDefaultLocalAddresses(List).
        Specified by:
        getDefaultLocalAddress in interface IoAcceptor
        Returns:
        a Set of the local InetSocketAddress which are bound currently. This method overrides the IoAcceptor.getDefaultLocalAddress() method.
      • setDefaultLocalAddress

        void setDefaultLocalAddress​(java.net.InetSocketAddress localAddress)
        Sets the default local InetSocketAddress to bind when no argument is specified in IoAcceptor.bind() method. Please note that the default will not be used if any local InetSocketAddress is specified. This method overrides the IoAcceptor.setDefaultLocalAddress(java.net.SocketAddress) method.
        Parameters:
        localAddress - The local address
      • isReuseAddress

        boolean isReuseAddress()
        Returns:
        true if the SO_REUSEADDR is enabled
        See Also:
        ServerSocket.getReuseAddress()
      • setReuseAddress

        void setReuseAddress​(boolean reuseAddress)
        Parameters:
        reuseAddress - tells if the SO_REUSEADDR is to be enabled
        See Also:
        ServerSocket.setReuseAddress(boolean)
      • getBacklog

        int getBacklog()
        Returns:
        the size of the backlog.
      • setBacklog

        void setBacklog​(int backlog)
        Sets the size of the backlog. This can only be done when this class is not bound
        Parameters:
        backlog - The backlog's size