DittoSharp  0.4.0-alpha3
Public Member Functions | Protected Member Functions | Properties | List of all members
DittoSharp.DittoKit Class Reference

The entrypoint to the DittoSharp SDK. More...

Inheritance diagram for DittoSharp.DittoKit:

Public Member Functions

unsafe DittoKit (DittoIdentity identity=default, string workingDir="dittokit")
 Initializes a new instance of the DittoKit class. More...
 
unsafe void StartTcpServer (string address)
 Starts a TCP server connection. More...
 
unsafe void StartWebsocketServer (string address)
 Starts a WebSocket server that other devices will be able to connect to. More...
 
unsafe void SetAccessLicense (string license)
 Activate a DittoKit instance by setting an access license. You cannot interact with DittoKit before you have activated it. More...
 

Protected Member Functions

override unsafe void drop (bool disposing)
 

Properties

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...
 

Detailed Description

The entrypoint to the DittoSharp SDK.

For a DittoKit instance to continue to connect to other devices it must be kept in scope.

Constructor & Destructor Documentation

◆ DittoKit()

unsafe DittoSharp.DittoKit.DittoKit ( DittoIdentity  identity = default,
string  workingDir = "dittokit" 
)
inline

Initializes a new instance of the DittoKit class.

Parameters
identityProvide the identity of the entity that is interacting with DittoKit.
workingDirThe directory that will be used to persist DittoKit data.

Member Function Documentation

◆ SetAccessLicense()

unsafe void DittoSharp.DittoKit.SetAccessLicense ( string  license)
inline

Activate a DittoKit instance by setting an access license. You cannot interact with DittoKit before you have activated it.

Parameters
licenseThe access license.

◆ StartTcpServer()

unsafe void DittoSharp.DittoKit.StartTcpServer ( string  address)
inline

Starts a TCP server connection.

Parameters
addressThe address of the server to connect to.

◆ StartWebsocketServer()

unsafe void DittoSharp.DittoKit.StartWebsocketServer ( string  address)
inline

Starts a WebSocket server that other devices will be able to connect to.

Parameters
addressThe address that the WebSocket server should run at.

Property Documentation

◆ Activated

bool DittoSharp.DittoKit.Activated
get

Gets a value indicating whether or not the SDK has been activated.

If false then you need to call DittoKit.SetAccessLicense(string) before interacting with the SDK.

◆ MinimumLogLevel

DittoLogLevel DittoSharp.DittoKit.MinimumLogLevel
staticset

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 DittoSharp.DittoKit.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

DittoStore DittoSharp.DittoKit.Store
get

Gets a reference to the embedded data store.