Ditto 1.1.8
Public Member Functions | Static Public Member Functions | Properties | List of all members
DittoSDK.DittoTransportConfig Class Reference

Configuration object specifying which network transports Ditto should use to sync data. More...

Inheritance diagram for DittoSDK.DittoTransportConfig:

Public Member Functions

void EnableAllPeerToPeer ()
 Enables all peer-to-peer network transports supported on the current platform. Currently, this is only connections to peers over local LAN Wi-Fi.
 
override bool Equals (object obj)
 
bool Equals (DittoTransportConfig other)
 
override int GetHashCode ()
 
DittoTransportConfig Copy ()
 Creates a deep copy of the config object. More...
 
override string ToString ()
 

Static Public Member Functions

static bool operator== (DittoTransportConfig left, DittoTransportConfig right)
 
static bool operator!= (DittoTransportConfig left, DittoTransportConfig right)
 

Properties

DittoPeerToPeer PeerToPeer [get, set]
 
DittoConnect Connect [get, set]
 
DittoListen Listen [get, set]
 
DittoGlobal Global [get, set]
 

Detailed Description

Configuration object specifying which network transports Ditto should use to sync data.

A Ditto object comes with a default transport configuration where all available peer-to-peer transports are enabled. You can customize this by initializing a DittoTransportConfig, adjusting its properties, and supplying it to SetTransportConfig() on Ditto.

When you initialize a DittoTransportConfig yourself it starts with all transports disabled. You must enable each one directly.

Peer-to-peer transports will automatically discover peers in the vicinity and create connections without any configuration. These are configured inside the PeerToPeer property. To turn each one on, set its enabled property to true.

To connect to a peer at a known location, such as a Ditto Big Peer, add its address inside the Connect configuration. These are either host:port strings for raw TCP sync, or a wss://… URL for websockets.

The Listen configurations are for specific less common data sync scenarios. Please read the documentation on the Ditto website for examples. Incorrect use of Listen can result in insecure configurations.

Member Function Documentation

◆ Copy()

DittoTransportConfig DittoSDK.DittoTransportConfig.Copy ( )
inline

Creates a deep copy of the config object.

Returns
A new, equivalent DittoTransportConfig instance.