Ejemplo n.º 1
0
        /// <summary>
        /// 服务成功事件处理
        /// </summary>
        /// <param name="sender">sender</param>
        /// <param name="e">e</param>
        private static void M_server_Connected(object sender, ConnectedEventArgs e)
        {
            var processor = new TcpProcessor(e.Client);

            processor.StartReceive();
            processor.DataReceived += Processor_DataReceived;
        }
Ejemplo n.º 2
0
 public void Start(System.Net.Sockets.TcpClient connection)
 {
     if (m_processor == null)
     {
         m_processor = new TcpProcessor(connection);
         m_processor.DataReceived           += m_processor_DataReceived;
         m_processor.ConnectionDisconnected += m_processor_ConnectionDisconnected;
         m_processor.StartReceive();
         m_processor.StartHeartBeat();
     }
 }