import { type PlatformBindings } from "https://deno.land/x/smoldot@light-js-deno-v0.7.9/instance/raw-instance.d.ts";
Contains functions that the client will use when it needs to leverage the platform.
Properties
Base64-decode the given buffer then decompress its content using the inflate algorithm with zlib header.
The input is considered trusted. In other words, the implementation doesn't have to resist malicious input.
This function is asynchronous because implementations might use the compression streams Web API, which for whatever reason is asynchronous.
The "should periodically yield" setting indicates whether the execution should periodically
yield back control by using setTimeout(..., 0)
.
On platforms such as browsers where setTimeout(..., 0)
takes way more than 0 milliseconds,
this setting should be set to false
.
This function registers a callback that is called when the setting should be updated with a new value. It returns the initial value of the setting and a function used to unregister the callback.
Methods
Tries to open a new connection using the given configuration.