Example #1
0
 private void RegisterCallback()
 {
     MessageCallbackInvoker.RegisterCallback <ConnectMessage>(new Action <IMessage, NetConnection>(OnConnectMessage));
     MessageCallbackInvoker.RegisterCallback <QueryConnectMessage>(new Action <IMessage, NetConnection>(OnConnectQueryMessage));
     MessageCallbackInvoker.RegisterCallback <QueryConnectMessageRsp>(new Action <IMessage, NetConnection>(OnConnectQueryMessageRsp));
     MessageCallbackInvoker.DefaultAction = new Action <IMessage, NetConnection>(DispatchMessage);
 }
Example #2
0
 private void RegisterCallback()
 {
     MessageCallbackInvoker.RegisterCallback <CommandMessage>(new Action <IMessage, NetConnection>(OnCommandMessage));
     MessageCallbackInvoker.RegisterCallback <ConnectMessage>(new Action <IMessage, NetConnection>(OnConnectMessage));
     MessageCallbackInvoker.RegisterCallback <PluginLoadMessage>(new Action <IMessage, NetConnection>(OnPluginLoadMessage));
     MessageCallbackInvoker.RegisterCallback <QueryConnectMessage>(new Action <IMessage, NetConnection>(OnConnectQueryMessage));
     MessageCallbackInvoker.RegisterCallback <QueryConnectMessageRsp>(new Action <IMessage, NetConnection>(OnConnectQueryMessageRsp));
 }