DITHTTPListenConfig
@interface DITHTTPListenConfig : NSObject<NSCopying, NSMutableCopying> {
@protected BOOL _enabled;
@protected NSString *_interfaceIp;
@protected uint16_t _port;
@protected NSString *_staticContentPath;
@protected BOOL _websocketSync;
@protected NSString *_tlsKeyPath;
@protected NSString *_tlsCertificatePath;
}
@property (nonatomic, readonly, getter = isEnabled) BOOL enabled;
/**
IP interface to bind to. [::] by default.
*/
@property (nonatomic, readonly) NSString *interfaceIp;
/**
Listening port. 80 by default.
*/
@property (nonatomic, readonly) uint16_t port;
/**
An absolute path to a directory of static HTTP content that should be served by this device.
If nil (default), this feature is disabled.
*/
@property (nonatomic, readonly, nullable) NSString *staticContentPath;
/**
If YES (default), peers can connect over websocket to sync with this peer.
This feature has security implications and should only be used together with documentation on Ditto's website.
*/
@property (nonatomic, readonly) BOOL websocketSync;
/**
An absolute path to the PEM-formatted private key for HTTPS. Must be set together with tlsCertificatePath.
If nil, the server runs as unencrypted HTTP.
*/
@property (nonatomic, readonly, nullable) NSString *tlsKeyPath;
/**
An absolute path to the PEM-formatted certificate for HTTPS. Must be set together with tlsKeyPath.
If nil, the server runs as unencrypted HTTP.
*/
@property (nonatomic, readonly, nullable) NSString *tlsCertificatePath;
- (instancetype)initWithDITHTTPListenConfig:(DITHTTPListenConfig *)config;
- (instancetype)initWithEnabled:(BOOL)enabled
interfaceIp:(NSString *)interfaceIp
port:(uint16_t)port
staticContentPath:(NSString * __nullable)staticContentPath
websocketSync:(BOOL)websocketSync
tlsKeyPath:(NSString * __nullable)tlsKeyPath
tlsCertificatePath:(NSString * __nullable)tlsCertificatePath NS_DESIGNATED_INITIALIZER;
- (BOOL)isEqualToDITHTTPListenConfig:(DITHTTPListenConfig *)config;
@end
Undocumented
-
Undocumented
Declaration
Objective-C
BOOL _enabled
-
Undocumented
Declaration
Objective-C
NSString *_interfaceIp
-
Undocumented
Declaration
Objective-C
uint16_t _port
-
Undocumented
Declaration
Objective-C
NSString *_staticContentPath
-
Undocumented
Declaration
Objective-C
BOOL _websocketSync
-
Undocumented
Declaration
Objective-C
NSString *_tlsKeyPath
-
Undocumented
Declaration
Objective-C
NSString *_tlsCertificatePath
-
Undocumented
Declaration
Objective-C
@property (nonatomic, readonly, getter = isEnabled) BOOL enabled
-
IP interface to bind to. [::] by default.
Declaration
Objective-C
@property (nonatomic, readonly) NSString *_Nonnull interfaceIp;
-
Listening port. 80 by default.
Declaration
Objective-C
@property (nonatomic, readonly) uint16_t port;
-
An absolute path to a directory of static HTTP content that should be served by this device.
If nil (default), this feature is disabled.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSString *staticContentPath;
-
If YES (default), peers can connect over websocket to sync with this peer.
This feature has security implications and should only be used together with documentation on Ditto’s website.
Declaration
Objective-C
@property (nonatomic, readonly) BOOL websocketSync;
-
An absolute path to the PEM-formatted private key for HTTPS. Must be set together with tlsCertificatePath.
If nil, the server runs as unencrypted HTTP.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSString *tlsKeyPath;
-
An absolute path to the PEM-formatted certificate for HTTPS. Must be set together with tlsKeyPath.
If nil, the server runs as unencrypted HTTP.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSString *tlsCertificatePath;
-
Undocumented
Declaration
Objective-C
- (instancetype)initWithDITHTTPListenConfig:(DITHTTPListenConfig *)config;
-
Undocumented
Declaration
Objective-C
- (instancetype)initWithEnabled:(BOOL)enabled interfaceIp:(NSString *)interfaceIp port:(uint16_t)port staticContentPath:(NSString * __nullable)staticContentPath websocketSync:(BOOL)websocketSync tlsKeyPath:(NSString * __nullable)tlsKeyPath tlsCertificatePath:(NSString * __nullable)tlsCertificatePath NS_DESIGNATED_INITIALIZER;
-
Undocumented
Declaration
Objective-C
- (BOOL)isEqualToDITHTTPListenConfig:(DITHTTPListenConfig *)config;