Class NetherNetServer

java.lang.Object
org.geysermc.geyser.network.bedrock.nethernet.NetherNetServer
All Implemented Interfaces:
org.geysermc.geyser.api.event.EventRegistrar

public final class NetherNetServer extends Object implements org.geysermc.geyser.api.event.EventRegistrar
The NetherNet (WebRTC) transport, used instead of RakNet: inbuilt HTTP signaling, NXS provider registration, or both, all on the Bedrock address, and on the Bedrock port unless "webrtc-port" or -DgeyserSignalingPort move them. Its state (signing identity, provider registration and DTLS identity) lives in the "nethernet" folder next to the config.
  • Constructor Details

    • NetherNetServer

      public NetherNetServer(GeyserImpl geyser)
  • Method Details

    • start

      public void start()
    • providerSettings

      public static org.cloudburstmc.netty.signaling.provider.ProviderRuntimeConfiguration.Settings providerSettings(GeyserConfig.SignalingConfig signaling, List<String> advertised, GeyserConfig.AdvancedNxsConfig advanced) throws IOException
      What the provider runtime is configured with. Geyser reports game outcomes itself.
      Throws:
      IOException
    • setServerStatus

      public void setServerStatus(org.cloudburstmc.netty.signaling.ServerStatus snapshot)
      Programmatic complete status override; panel fixed values still take precedence at the provider.
    • setServerStatusSupplier

      public void setServerStatusSupplier(Supplier<org.cloudburstmc.netty.signaling.ServerStatus> supplier)
    • restoreAutomaticServerStatus

      public void restoreAutomaticServerStatus()
    • serverStatus

      public org.cloudburstmc.netty.signaling.ServerStatus serverStatus()
    • providerClient

      public @Nullable org.cloudburstmc.netty.signaling.ProviderClient providerClient()
    • advertised

      public NetherNetServer.Advertised advertised()
      Returns:
      what each running signaling mode currently sends to joining players
    • storeOperatorAction

      public @Nullable String storeOperatorAction(Optional<org.cloudburstmc.netty.signaling.ProviderClient.OperatorAction> action) throws IOException
      Keeps the provider's link for the operator, such as one to claim this server, in the data folder. See storeOperatorAction(Path, Optional).
      Throws:
      IOException
    • storeOperatorAction

      public static @Nullable String storeOperatorAction(Path file, Optional<org.cloudburstmc.netty.signaling.ProviderClient.OperatorAction> action) throws IOException
      Writes the provider's link to a file only this user can read, as it grants access to this server and a console is often logged. With no link the file is removed.
      Returns:
      the provider's text and where its link is, or null when there is none
      Throws:
      IOException
    • providerChannel

      public @Nullable io.netty.channel.Channel providerChannel()
    • gameOutcomes

      public GameOutcomeReporter gameOutcomes()
    • providerFailure

      public static String providerFailure(Throwable failure)
      Returns:
      why a request to the external signaling service failed: the service's own explanation when it gave one, else the exception's type and message
    • shutdown

      public void shutdown()