コード例 #1
0
        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)
                                          ));
        }
コード例 #2
0
 public override void OnServerAuthenticate(NetworkConnectionToClient conn)
 {
     // wait for AuthRequestMessage from client
     conn.RegisterHandler <NetworkConnectionToClient, AuthRequestMessage>(OnAuthRequestMessage, false);
 }