createTransport
Essential
The createTransport function creates a custom Transport instance from the provided implementation callbacks.
createTransport(
implementations: TransportImplementations,
options?: TransportOptions,
extraMembers?: ExtraMembers,
): Transport| Type | Description | |
|---|---|---|
implementations | TransportImplementations | Methods for connecting and sending/receiving. |
options? | TransportOptions |
|
extraMembers? | ExtraMembers | Additional properties to attach. |
| returns | Transport |
This low-level factory enables building transports for any communication channel by implementing the attach, detach, and sendPacket callbacks. The Transport handles message fragmentation and reassembly automatically based on the configured fragment size.
Most applications should use pre-built transport factories like createWsClientTransport or createBroadcastChannelTransport rather than calling this function directly.
Since
v0.0.0