import { type ConnectionConfig } from "https://deno.land/x/smoldot2@light-js-deno-v2.0.4/internals/client.d.ts";
Configuration for a connection.
Properties
Callback called when the connection transitions from the Opening
to the Open
state.
Must only be called once per connection.
Callback called when the connection transitions to the Reset
state.
It it not called if Connection.reset
is manually called by the API user.
Callback called when a new substream has been opened.
This function must only be called for connections of type "multi-stream".
Callback called when a stream transitions to the Reset
state.
It it not called if Connection.resetStream
is manually called by the API user.
This function must only be called for connections of type "multi-stream".
Callback called when some data sent using Connection.send has effectively been written on the stream, meaning that some buffer space is now free.
Can only happen while the connection is in the Open
state.
This callback must not be called after closeSend
has been called.
The streamId
parameter must be provided if and only if the connection is of type
"multi-stream".
Only a number of bytes equal to the size of the data provided to Connection.send
must be reported. In other words, the initialWritableBytes
must never be exceeded.