Use client version to register validators, delivery hooks.

This commit is contained in:
akwizgran
2018-04-13 16:11:03 +01:00
parent 1197d65d8d
commit 114044ee5f
13 changed files with 88 additions and 62 deletions

View File

@@ -35,13 +35,15 @@ public interface ValidationManager {
/**
* Sets the message validator for the given client.
*/
void registerMessageValidator(ClientId c, MessageValidator v);
void registerMessageValidator(ClientId c, int clientVersion,
MessageValidator v);
/**
* Sets the incoming message hook for the given client. The hook will be
* called once for each incoming message that passes validation.
*/
void registerIncomingMessageHook(ClientId c, IncomingMessageHook hook);
void registerIncomingMessageHook(ClientId c, int clientVersion,
IncomingMessageHook hook);
interface MessageValidator {