mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-23 04:57:18 +00:00
Make KcpTunnel
public
This commit is contained in:
parent
0fb0b590e1
commit
9c0b9afae2
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user