Interface DittoPresence.ConnectionRequestHandler

Enclosing class:
DittoPresence
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 DittoPresence.ConnectionRequestHandler

Handler interface for controlling incoming connection requests.

Implement this interface to control which peers are allowed to connect to the local peer. The handler is called for each incoming connection request and must return a DittoConnectionRequestAuthorization to accept or reject the connection.

Important: Handlers must respond within 10 seconds or the connection will be automatically denied. Handlers should not throw exceptions.

See Also: