mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2026-05-21 01:59:51 +08:00
Organize & sort the KCP system
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package emu.grasscutter.net;
|
||||
|
||||
public interface KcpChannel {
|
||||
/**
|
||||
* Event fired when the client connects.
|
||||
*
|
||||
* @param tunnel The tunnel.
|
||||
*/
|
||||
void onConnected(KcpTunnel tunnel);
|
||||
|
||||
/**
|
||||
* Event fired when the client disconnects.
|
||||
*/
|
||||
void onDisconnected();
|
||||
|
||||
/**
|
||||
* Event fired when data is received from the client.
|
||||
*
|
||||
* @param bytes The data received.
|
||||
*/
|
||||
void onMessage(byte[] bytes);
|
||||
}
|
||||
Reference in New Issue
Block a user