DITTransportConfig
@interface DITTransportConfig : NSObject <NSCopying, NSMutableCopying>
A configuration object specifying which network transports Ditto should use to sync data.
A DITDitto object comes with a default transport configuration where all available peer-to-peer transports are enabled. You can customize this by initializing a DITMutableTransportConfig, adjusting its properties, and supplying it to setTransportConfig: on DITDitto. When you initialize a DITMutableTransportConfig yourself it starts with all transports disabled. You must enable each one directly.
-
TransportConfig instance type.
Declaration
Objective-C
+ (nonnull instancetype)transportConfig; -
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 YES.
Declaration
Objective-C
@property (nonatomic, readonly) DITPeerToPeer *_Nonnull peerToPeer; -
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.
Declaration
Objective-C
@property (nonatomic, readonly) DITConnect *_Nonnull connect; -
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.
Declaration
Objective-C
@property (nonatomic, readonly) DITListen *_Nonnull listen; -
The global configuration is transport agnostic.
Declaration
Objective-C
@property (nonatomic, readonly) DITGlobalConfig *_Nonnull global; -
Initialize with DITTransportConfig.
Declaration
Objective-C
- (nonnull instancetype)initWithDITTransportConfig: (nonnull DITTransportConfig *)config; -
Initialize DITTransportConfig with configuration subobjects.
Declaration
Objective-C
- (nonnull instancetype)initWithPeerToPeer:(nonnull DITPeerToPeer *)peerToPeer connect:(nonnull DITConnect *)connect listen:(nonnull DITListen *)listen global:(nonnull DITGlobalConfig *)global;
-
Undocumented
Declaration
Objective-C
- (DITTransportConfig *)copy; -
Undocumented
Declaration
Objective-C
- (DITMutableTransportConfig *)mutableCopy;
DITTransportConfig Class Reference