Beispiel #1
0
 protected override void OnDestroy()
 {
     if (netChannel != null)
     {
         netChannel.Close();
     }
 }
Beispiel #2
0
 void OnDestroy()
 {
     DCLog.Log("end main");
     mChannel.DisposeRes();
     mChannel.Close();
     mServer.DisposeRes();
     mServer.Close();
 }
Beispiel #3
0
 private async void OnChannelError(NetChannel channel, SocketError socketError)
 {
     if (channel.ChannelType == ChannelType.Client)
     {
         if (!await channel.ReConnecting())
         {
             channel.Close();
         }
         else
         {
             return;
         }
     }
     else
     {
         channel.DisConnect();
     }
     Channels.TryRemove(channel.ObjectId, out NetChannel valu);
 }
Beispiel #4
0
 public void Stop()
 {
     mChannel.Close();
     mChannel.DisposeRes();
 }