Package top.focess.qq.api.net
Interface Socket
-
public interface SocketRepresents a FocessSocket. This class is used to handle socket.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanclose()Close the socketbooleancontainsClientSide()Indicate this socket contains client side receiverbooleancontainsServerSide()Indicate this socket contains server side receivervoidregisterReceiver(Receiver receiver)Register packet receiver for this socketvoidunregister(Plugin plugin)Unregister the packet-handlers of the plugin
-
-
-
Method Detail
-
registerReceiver
void registerReceiver(Receiver receiver)
Register packet receiver for this socket- Parameters:
receiver- the packet receiver for this socket
-
containsServerSide
boolean containsServerSide()
Indicate this socket contains server side receiver- Returns:
- true if it contains server side receiver, false otherwise
-
containsClientSide
boolean containsClientSide()
Indicate this socket contains client side receiver- Returns:
- true if it contains client side receiver, false otherwise
-
close
boolean close()
Close the socket- Returns:
- true if there is some resources not closed before, false otherwise
-
unregister
void unregister(Plugin plugin)
Unregister the packet-handlers of the plugin- Parameters:
plugin- the plugin
-
-