Make KcpTunnel public

This commit is contained in:
KingRainbow44 2023-05-11 21:10:38 -04:00
parent 0fb0b590e1
commit 9c0b9afae2
No known key found for this signature in database
GPG Key ID: FC2CB64B00D257BE

View File

@ -5,11 +5,12 @@ import emu.grasscutter.utils.Utils;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled; import io.netty.buffer.Unpooled;
import io.netty.channel.DefaultEventLoop; import io.netty.channel.DefaultEventLoop;
import java.net.InetSocketAddress;
import java.util.concurrent.ConcurrentHashMap;
import kcp.highway.KcpListener; import kcp.highway.KcpListener;
import kcp.highway.Ukcp; import kcp.highway.Ukcp;
import java.net.InetSocketAddress;
import java.util.concurrent.ConcurrentHashMap;
public class GameSessionManager { public class GameSessionManager {
private static final DefaultEventLoop logicThread = new DefaultEventLoop(); private static final DefaultEventLoop logicThread = new DefaultEventLoop();
private static final ConcurrentHashMap<Ukcp, GameSession> sessions = new ConcurrentHashMap<>(); private static final ConcurrentHashMap<Ukcp, GameSession> sessions = new ConcurrentHashMap<>();
@ -95,7 +96,7 @@ public class GameSessionManager {
return listener; return listener;
} }
interface KcpTunnel { public interface KcpTunnel {
InetSocketAddress getAddress(); InetSocketAddress getAddress();
void writeData(byte[] bytes); void writeData(byte[] bytes);