Interface NetherNetHTTPSignaling.PlayerFilter

Enclosing class:
NetherNetHTTPSignaling
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface NetherNetHTTPSignaling.PlayerFilter
Functional interface for filtering players before a connection is created for them.
  • Method Details

    • allow

      boolean allow(String host, PlayerInfo player)
      Called once the identity attached to an SDP offer has been validated, before the connection is handed to the NetherNetServerSignaling.NewConnectionHandler.

      Called on the event loop, so don't block in here. A thrown exception is treated as a rejection.

      Parameters:
      host - The host header from the join request, which may be used to identify the server
      player - The validated player attempting to join
      Returns:
      true to accept the player, false to reject them with a 403