Synclets logoSynclets

createTransport

Essential

The createTransport function creates a custom Transport instance from the provided implementation callbacks.

createTransport(
  implementations: TransportImplementations,
  options?: TransportOptions,
  extraMembers?: ExtraMembers,
): Transport
TypeDescription
implementationsTransportImplementations

Methods for connecting and sending/receiving.

options?TransportOptions

Transport configuration including fragment size.

extraMembers?ExtraMembers

Additional properties to attach.

returnsTransport

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