public void del(Ukcp ukcp) { if (!_ukcps.TryRemove(ukcp.getConv(), out var temp)) { Console.WriteLine("ukcp session is not exist conv: " + ukcp.getConv()); } }
public void del(Ukcp ukcp) { _ukcps.TryRemove(ukcp.getConv(), out var temp); if (temp == null) { Console.WriteLine("ukcp session is not exist conv: " + ukcp.getConv()); } ukcp.user().Channel.CloseAsync(); }
public void New(EndPoint endPoint, Ukcp ukcp, DatagramPacket msg) { var conv = ukcp.getConv(); if (msg != null) { conv = getConv(msg); ukcp.setConv(conv); } _ukcps.TryAdd(conv, ukcp); }