Ejemplo n.º 1
0
 public void TraceVerbose(string message)
 {
     if (m_traceSource != null)
     {
         m_traceSource.TraceVerbose(message);
     }
 }
Ejemplo n.º 2
0
        void DeserializerMain()
        {
            try
            {
                while (true)
                {
                    var msg = Serializer.Deserialize(m_stream);

                    m_msgQueue.Enqueue(msg);

                    var ev = this.NewMessageEvent;
                    if (ev != null)
                    {
                        ev();
                    }
                }
            }
            catch (Exception e)
            {
                m_isConnected = false;

                m_stream.Close();

                trace.TraceInformation("[RX]: error {0}", e.Message);

                var ev = this.NewMessageEvent;
                if (ev != null)
                {
                    ev();
                }
            }

            trace.TraceVerbose("Deserializer thread ending");
        }
Ejemplo n.º 3
0
        void DeserializerMain()
        {
            try
            {
                while (true)
                {
                    var msg = ReceiveInternal();

                    m_msgQueue.Enqueue(msg);

                    var ev = this.NewMessageEvent;
                    if (ev != null)
                    {
                        ev();
                    }
                }
            }
            catch (Exception e)
            {
                trace.TraceInformation("[RX]: socket error {0}", e.Message);

                m_socket.Shutdown(SocketShutdown.Both);
                m_socket.Close();

                var ev = this.NewMessageEvent;
                if (ev != null)
                {
                    ev();
                }
            }

            trace.TraceVerbose("Deserializer thread ending");
        }