public IEnumerator RegisterMessage1() { Action <WovenTestMessage> func = Substitute.For <Action <WovenTestMessage> >(); connectionToClient.RegisterHandler(func); connectionToServer.Send(message); yield return(null); func.Received().Invoke( Arg.Is <WovenTestMessage>(msg => msg.Equals(message) )); }
public override void OnServerAuthenticate(NetworkConnectionToClient conn) { // wait for AuthRequestMessage from client conn.RegisterHandler <NetworkConnectionToClient, AuthRequestMessage>(OnAuthRequestMessage, false); }