Example #1
0
        /// <summary>
        /// Creates a new Socket for a newly created connection and  a new thread to receive packet in the loop.
        /// </summary>
        private void AcceptLoop()
        {
            try
            {
                AcceptLoopInternal();
            }
            catch (Exception ex)
            {
                var exceptionEvent = new TransportEvent(EventType.Exception, null, ex);

                packetQueue.AddObject(exceptionEvent);
            }
        }
Example #2
0
        /// <summary>
        /// Receive data, decode Packet and add them to QueueManager in the loop.
        /// </summary>
        private void ReceiveLoop()
        {
            try
            {
                ReceiveLoopInternal();
            }
            catch (Exception ex)
            {
                var exceptionEvent = new TransportEvent(EventType.Exception, this.endPointIdentity, ex);

                packetQueue.AddObject(exceptionEvent);
            }
        }