public interface ServerReceiver extends Receiver
| 限定符和类型 | 方法和说明 |
|---|---|
@Nullable Client |
getClient(String name)
Get the client by given name
|
boolean |
isConnected(String client)
Indicate the client is connected to server
|
<T extends Packet> |
registerPackHandler(String client,
Class<T> c,
PackHandler<T> packHandler)
Register packet handler for special client
|
void |
sendPacket(String client,
Packet packet)
Send packet to the special client
|
void sendPacket(String client, Packet packet)
client - the client namepacket - the packet<T extends Packet> void registerPackHandler(String client, Class<T> c, PackHandler<T> packHandler)
T - the packet typeclient - the client namec - the packet classpackHandler - the packet handlerboolean isConnected(String client)
client - the client nameCopyright © 2022. All rights reserved.