Target SteamKit 2.4.0-Alpha.2

pull/190/head
Ryan Kistner 5 years ago
parent 60b4451417
commit 27960f3d18

@ -19,9 +19,7 @@ namespace DepotDownloader
private readonly Steam3Session steamSession;
private readonly uint appId;
public CDNClient CDNClient { get; }
#if STEAMKIT_UNRELEASED
public CDNClient.Server ProxyServer { get; private set; }
#endif
private readonly ConcurrentStack<CDNClient.Server> activeConnectionPool;
private readonly BlockingCollection<CDNClient.Server> availableServerEndpoints;
@ -101,19 +99,13 @@ namespace DepotDownloader
return;
}
#if STEAMKIT_UNRELEASED
ProxyServer = servers.Where(x => x.UseAsProxy).FirstOrDefault();
#endif
var weightedCdnServers = servers
.Where(server =>
{
#if STEAMKIT_UNRELEASED
var isEligibleForApp = server.AllowedAppIds == null || server.AllowedAppIds.Contains(appId);
return isEligibleForApp && (server.Type == "SteamCache" || server.Type == "CDN");
#else
return server.Type == "SteamCache" || server.Type == "CDN";
#endif
})
.Select(server =>
{

@ -827,13 +827,8 @@ namespace DepotDownloader
connection = cdnPool.GetConnection(cts.Token);
var cdnToken = await cdnPool.AuthenticateConnection(appId, depot.id, connection);
#if STEAMKIT_UNRELEASED
depotManifest = await cdnPool.CDNClient.DownloadManifestAsync(depot.id, depot.manifestId,
connection, cdnToken, depot.depotKey, proxyServer: cdnPool.ProxyServer).ConfigureAwait(false);
#else
depotManifest = await cdnPool.CDNClient.DownloadManifestAsync(depot.id, depot.manifestId,
connection, cdnToken, depot.depotKey).ConfigureAwait(false);
#endif
cdnPool.ReturnConnection(connection);
}
@ -1200,13 +1195,8 @@ namespace DepotDownloader
connection = cdnPool.GetConnection(cts.Token);
var cdnToken = await cdnPool.AuthenticateConnection(appId, depot.id, connection);
#if STEAMKIT_UNRELEASED
chunkData = await cdnPool.CDNClient.DownloadDepotChunkAsync(depot.id, data,
connection, cdnToken, depot.depotKey, proxyServer: cdnPool.ProxyServer).ConfigureAwait(false);
#else
chunkData = await cdnPool.CDNClient.DownloadDepotChunkAsync(depot.id, data,
connection, cdnToken, depot.depotKey).ConfigureAwait(false);
#endif
cdnPool.ReturnConnection(connection);
}

@ -6,6 +6,6 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="protobuf-net" Version="3.0.73" />
<PackageReference Include="SteamKit2" Version="2.3.0" />
<PackageReference Include="SteamKit2" Version="2.4.0-Alpha.2" />
</ItemGroup>
</Project>
Loading…
Cancel
Save