openSync

Synchronously creates and returns a new Ditto instance using the provided configuration.

Important: This API is in preview and will become the standard way to initialize Ditto instances in v5, replacing the legacy DittoIdentity-based constructor.

This is a blocking convenience method for initializing Ditto, intended for use in non-async environments. The method will block the calling thread until the instance is ready or an error is thrown.

Return

The newly created Ditto instance.

Parameters

config

The configuration to initialize the new Ditto instance with.

See also

for an async alternative.

Throws

May throw other DittoErrors for other initialization failures.