Package org.geysermc.geyser.network
Class ConnectionRequests
java.lang.Object
org.geysermc.geyser.network.ConnectionRequests
The pre-authentication gate every inbound connection passes, whichever transport carried it.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanaccept(GeyserImpl geyser, InetSocketAddress clientAddress, @Nullable InetSocketAddress proxyAddress) FiresConnectionRequestEventand reports whether the connection may proceed.static booleanaccept(GeyserImpl geyser, InetSocketAddress clientAddress, @Nullable InetSocketAddress proxyAddress, @Nullable String source) Asaccept(GeyserImpl, InetSocketAddress, InetSocketAddress), naming where the transport learned the address in the debug line.
-
Method Details
-
accept
public static boolean accept(GeyserImpl geyser, InetSocketAddress clientAddress, @Nullable InetSocketAddress proxyAddress) FiresConnectionRequestEventand reports whether the connection may proceed.Extensions use this to refuse a peer by address, before any session exists, so every transport has to ask before it creates one.
- Parameters:
geyser- The running instanceclientAddress- The address the connection came fromproxyAddress- The proxy that forwarded it, or null when the transport has no proxy support- Returns:
- true when the connection may proceed
-
accept
public static boolean accept(GeyserImpl geyser, InetSocketAddress clientAddress, @Nullable InetSocketAddress proxyAddress, @Nullable String source) Asaccept(GeyserImpl, InetSocketAddress, InetSocketAddress), naming where the transport learned the address in the debug line.- Parameters:
source- Where the address came from, or null when the transport has only the one kind
-