Beispiel #1
0
 public override void Destroy()
 {
     if (m_socket != null)
     {//socket只有外部调用时才主动关闭,否则底层会先自己关闭
         m_socket.Close();
         m_socket = null;
     }
     if (m_channel != null)
     {
         m_channel.Destroy();
         NetChannelPools.Despawn(m_channel);
         m_channel = null;
     }
     base.Destroy();
 }