Class GeyserInjector
java.lang.Object
org.geysermc.geyser.network.netty.GeyserInjector
- Direct Known Subclasses:
GeyserBungeeInjector
,GeyserSpigotInjector
,GeyserVelocityInjector
Used to inject Geyser clients directly into the server, bypassing the need to implement a complete TCP connection,
by creating a local channel.
-
Field Summary
Modifier and TypeFieldDescriptionprotected io.netty.channel.ChannelFuture
The local channel we can use to inject ourselves into the server without creating a TCP connection.protected SocketAddress
The LocalAddress to use to connect to the server without connecting over TCP. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionThe LocalAddress to use to connect to the server without connecting over TCP.void
initializeLocalChannel(GeyserBootstrap bootstrap)
protected abstract void
initializeLocalChannel0(GeyserBootstrap bootstrap)
The method to implement that is called byinitializeLocalChannel(GeyserBootstrap)
wrapped around a try/catch.void
shutdown()
-
Field Details
-
localChannel
protected io.netty.channel.ChannelFuture localChannelThe local channel we can use to inject ourselves into the server without creating a TCP connection. -
serverSocketAddress
The LocalAddress to use to connect to the server without connecting over TCP.
-
-
Constructor Details
-
GeyserInjector
public GeyserInjector()
-
-
Method Details
-
initializeLocalChannel
- Parameters:
bootstrap
- the bootstrap of the Geyser instance.
-
initializeLocalChannel0
The method to implement that is called byinitializeLocalChannel(GeyserBootstrap)
wrapped around a try/catch.- Throws:
Exception
-
shutdown
public void shutdown() -
getServerSocketAddress
The LocalAddress to use to connect to the server without connecting over TCP.
-