This is passed to handler functions registered for the SYSTEM_ERROR built-in message.

Inheritance: UnityEngine.Networking.MessageBase
Exemple #1
0
    private void __OnError(NetworkMessage message)
    {
        UnityEngine.Networking.NetworkSystem.ErrorMessage errorMessage = message == null ? null : message.ReadMessage <UnityEngine.Networking.NetworkSystem.ErrorMessage>();
        if (errorMessage == null)
        {
            return;
        }

        if (onError != null)
        {
            onError((MahjongErrorType)errorMessage.errorCode);
        }
    }
Exemple #2
0
 void OnError1(NetworkMessage netMsg)
 {
     UnityEngine.Networking.NetworkSystem.ErrorMessage msg = netMsg.ReadMessage <UnityEngine.Networking.NetworkSystem.ErrorMessage>();
     Assert.AreEqual(NetworkError.DNSFailure, (NetworkError)msg.errorCode);
     steps += 1;
 }
 private void GenerateError(int error)
 {
     NetworkMessageDelegate networkMessageDelegate = this.m_MessageHandlers.GetHandler((short) 34) ?? this.m_MessageHandlers.GetHandler((short) 34);
       if (networkMessageDelegate == null)
     return;
       ErrorMessage errorMessage = new ErrorMessage();
       errorMessage.errorCode = error;
       byte[] buffer = new byte[200];
       NetworkWriter writer = new NetworkWriter(buffer);
       errorMessage.Serialize(writer);
       NetworkReader networkReader = new NetworkReader(buffer);
       networkMessageDelegate(new NetworkMessage()
       {
     msgType = (short) 34,
     reader = networkReader,
     conn = this.m_Connection,
     channelId = 0
       });
 }
 private void GenerateError(NetworkConnection conn, int error)
 {
     if (this.m_MessageHandlers.GetHandler((short) 34) == null)
     return;
       ErrorMessage errorMessage = new ErrorMessage();
       errorMessage.errorCode = error;
       NetworkWriter writer = new NetworkWriter();
       errorMessage.Serialize(writer);
       NetworkReader reader = new NetworkReader(writer);
       this.m_MessageHandlers.InvokeHandler((short) 34, conn, reader, 0);
 }
 private void GenerateError(NetworkConnection conn, int error)
 {
     if (handlers.ContainsKey(0x22))
     {
         ErrorMessage message = new ErrorMessage {
             errorCode = error
         };
         NetworkWriter writer = new NetworkWriter();
         message.Serialize(writer);
         NetworkReader reader = new NetworkReader(writer);
         conn.InvokeHandler(0x22, reader, 0);
     }
 }