Ejemplo n.º 1
0
 private void OnSocketError(ISocket sender, SocketErrorArgs errorArgs)
 {
     #if !SERVER
     UnityEngine.Debug.Log("Socket error " + errorArgs.Message + " " + errorArgs.Exception != null ? errorArgs.Exception.ToString() : null);
     #endif
     if (SocketError != null)
     {
         SocketError(this, errorArgs);
     }
 }
        private void OnError(ILowProtocol sender, SocketErrorArgs args)
        {
            m_protocol.Enabled     -= OnEnabled;
            m_protocol.SocketError -= OnError;
            m_protocol.Disabled    -= OnDisabled;
            m_protocol.Dispose();

            if (m_response != null)
            {
                m_response(new Error(StatusCode.ConnectionError)
                {
                    Message = args.Message
                });
            }

            m_protocol = null;
            m_call     = null;
            m_response = null;
        }