private bool GetConnection(EndPoint point, out UdpServerConnection connection) { bool ret = false; lock (end2conLock) { ret = endPoint2Connection.TryGetValue(point, out connection); } return(ret); }
private void CreateConnection(EndPoint point, ref UdpServerConnection connection, ref uint convID_) { convID_ = GenerateConvID(); connection = new UdpServerConnection(this, point, convID_); lock (end2conLock) { endPoint2Connection.Add(point, connection); } #if DOTNET_CORE newConnQueue.Post(connection); #else newConnQueue.Enqueue(connection); #endif }