WebDatabaseEndpoint typedef

WebDatabaseEndpoint = ({String connectName, MessagePort connectPort, String? lockName})

An endpoint that can be used, by any running JavaScript context in the same website, to connect to an existing WebSqliteConnection.

These endpoints are created by calling WebSqliteConnection.exposeEndpoint and consist of a MessagePort and two Strings internally identifying the connection. Both objects can be transferred over send ports towards another worker or context. That context can then use WebSqliteConnection.connectToEndpoint to connect to the port already opened.

Implementation

typedef WebDatabaseEndpoint = ({
  MessagePort connectPort,
  String connectName,
  String? lockName,
});