Esc

close_http2_channel

procedureextensionexperimentalsince 0.36.1Source
  • macOS: close_http2_channel works on macOS
  • Linux: close_http2_channel works on Linux
  • Windows: close_http2_channel works on Windows
  • Wasm: close_http2_channel works on Wasm

Closes this scope's connections and waits for TLS links to stop using their configuration. First close all its exchanges. Does not touch other channels.

Signature

close_http2_channel :: (channel: *Http2_Channel)
Example
Io :: #import "Extensions/Io";

main :: () {
    Io.io_run(() {
        channel: Http2_Channel;
        channel.base_url = "https://example.com";

        // Every exchange is closed first; a channel that opened none has nothing to close.
        close_http2_channel(*channel);
        assert(channel.active_exchanges == 0);
    });
}

See also