The entrypoint to the DittoSyncKit SDK.
More...
|
override unsafe void | drop (bool disposing) |
|
|
static DittoLogLevel | MinimumLogLevel [set] |
| Sets the minimum logging level to be printed in the console or stdout. For example if this is set to DittoLogLevel.Warning , then only logs that are logged with the Warning or Error log levels will be shown. More...
|
|
bool | Activated [get] |
| Gets a value indicating whether or not the SDK has been activated. More...
|
|
unsafe uint | SiteId [get] |
| Gets the unique identifier of a peer in Ditto's distributed mesh network. More...
|
|
DittoStore | Store [get] |
| Gets a reference to the embedded data store. More...
|
|
The entrypoint to the DittoSyncKit SDK.
For a DittoSyncKit
instance to continue to connect to other devices it must be kept in scope.
◆ DittoSyncKit()
unsafe Ditto.SyncKit.DittoSyncKit.DittoSyncKit |
( |
DittoIdentity |
identity = default , |
|
|
string |
workingDir = "dittosynckit" |
|
) |
| |
|
inline |
Initializes a new instance of the DittoSyncKit class.
- Parameters
-
identity | Provide the identity of the entity that is interacting with DittoSyncKit. |
workingDir | The directory that will be used to persist DittoSyncKit data. |
◆ SetAccessLicense()
unsafe void Ditto.SyncKit.DittoSyncKit.SetAccessLicense |
( |
string |
license | ) |
|
|
inline |
Activate a DittoSyncKit instance by setting an access license. You cannot interact with DittoSyncKit before you have activated it.
- Parameters
-
license | The access license. |
◆ StartHTTPServer()
unsafe void Ditto.SyncKit.DittoSyncKit.StartHTTPServer |
( |
string |
address, |
|
|
bool |
enableWebsocket, |
|
|
string |
staticPath = null , |
|
|
string |
tlsCertPath = null , |
|
|
string |
tlsKeyPath = null |
|
) |
| |
|
inline |
Starts an HTTP server that other devices will be able to connect to.
- Parameters
-
address | The address that the WebSocket server should run at. |
enableWebsocket | Whether to accept Ditto sync connections on this port. |
staticPath | An absolute path to a directory of static files that should be served. May be null. |
tlsCertPath | If using TLS, an absolute path to a file containing this server's certificate. Otherwise null. |
tlsKeyPath | If using TLS, an absolute path to a file containing this server's private key. Otherwise null. |
◆ StartTcpServer()
unsafe void Ditto.SyncKit.DittoSyncKit.StartTcpServer |
( |
string |
address | ) |
|
|
inline |
Starts a TCP server connection.
- Parameters
-
address | The address of the server to connect to. |
◆ Activated
bool Ditto.SyncKit.DittoSyncKit.Activated |
|
get |
◆ MinimumLogLevel
Sets the minimum logging level to be printed in the console or stdout. For example if this is set to DittoLogLevel.Warning
, then only logs that are logged with the Warning
or Error
log levels will be shown.
◆ SiteId
unsafe uint Ditto.SyncKit.DittoSyncKit.SiteId |
|
get |
Gets the unique identifier of a peer in Ditto's distributed mesh network.
IMPORTANT: This must be unique or the merging and conflict resolution will have unexpected behavior.
◆ Store
Gets a reference to the embedded data store.