Vixen
02b45cc4
csharp
public sealed class HttpContentTransport

The real one: HTTP, with byte ranges.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Deliberately thin. Timeouts, retries, proxies and certificate policy are all HttpClient configuration, and a game that needs any of them configures the client it hands in rather than asking this class for a knob.

The response is read with ResponseHeadersRead, so a 400 MB bundle streams into the cache file instead of being buffered whole before the first byte reaches disk.

Methods (4)

  • public HttpContentTransport()

    Fetches over HTTP with a client of its own.

  • public HttpContentTransport(HttpClient client, bool ownsClient = false)

    Fetches over HTTP with a client the caller configured.

  • public ValueTask<ContentDownload> GetAsync(string url, long offset = 0, CancellationToken cancellationToken = default(CancellationToken))

    Starts reading a URL.

  • public void Dispose()

    Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Used by (3)

  • ProgramAddressablesRemote
  • ContentMountVixen.App.Hosting
  • HttpContentTransportTestsVixen.Assets.Tests