protected override void OnDestroy() { if (netChannel != null) { netChannel.Close(); } }
void OnDestroy() { DCLog.Log("end main"); mChannel.DisposeRes(); mChannel.Close(); mServer.DisposeRes(); mServer.Close(); }
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); }
public void Stop() { mChannel.Close(); mChannel.DisposeRes(); }