Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add some comment to source interface, despite being almost self-apparent
  • Loading branch information
johnbanq committed Apr 22, 2021
commit d7c848be8d641fd1def988273db15e892b53e71a
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,49 @@
*/
public interface SourceInterface {

/**
* set the main motd and submotd returned on client ping
*/
void setMotd(String motd, String subMotd);

/**
* perform some process need to be done per tick, used on ticking
*/
boolean process();

/**
* gracefully shutdown the interface
*/
void shutdown();

/**
* shutdown immediately
*/
void emergencyShutdown();

/**
* block an address indefinitely
*/
void blockAddress(InetAddress address);

/**
* block an address for specified amount of time
*/
void blockAddress(InetAddress address, long timeout, TimeUnit unit);

/**
* unblock an address
*/
void unblockAddress(InetAddress address);

/**
* send raw UDP packet to target address
*/
void sendRawPacket(InetSocketAddress socketAddress, ByteBuf payload);

/**
* set the manager that this interface belongs to
*/
void setNetworkManager(NetworkManager networkManager);

void sendRawPacket(InetSocketAddress socketAddress, ByteBuf payload);
}