DITConnection
@interface DITConnection : NSObject <NSCopying>
Represents a connection between two peers on the Ditto mesh network.
-
Unique identifier for the connection.
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSString *_Nonnull id;
-
Type of transport enabling this connection.
Declaration
Objective-C
@property (nonatomic, readonly) DITConnectionType type;
-
The address of the peer at one end of the connection.
Declaration
Objective-C
@property (nonatomic, copy, readonly) DITAddress *_Nonnull peer1;
-
The address of the peer at one end of the connection.
Declaration
Objective-C
@property (nonatomic, copy, readonly) DITAddress *_Nonnull peer2;
-
Undocumented
Declaration
Objective-C
@property (nonatomic, readonly, nullable, copy) NSNumber *approximateDistanceInMeters
-
Unavailable
Undocumented
Declaration
Objective-C
- (instancetype)init NS_UNAVAILABLE;
-
Initializes the connection with a dictionary representation.
Declaration
Objective-C
- (nonnull instancetype)initWithDictionaryRepresentation: (nonnull NSDictionary *)dictionaryRepresentation;
-
Initializes the connection with all possible parameters.
Declaration
Objective-C
- (nonnull instancetype)initWithID:(nonnull NSString *)ID type:(DITConnectionType)type peer1:(nonnull DITAddress *)peer1 peer2:(nonnull DITAddress *)peer2 approximateDistanceInMeters: (nullable NSNumber *)approximateDistanceInMeters;
-
Undocumented
Declaration
Objective-C
- (NSUInteger)hash;
-
Undocumented
Declaration
Objective-C
- (BOOL)isEqual:(nullable id)object;
-
Undocumented
Declaration
Objective-C
- (BOOL)isEqualToConnection:(DITConnection *)connection;
-
Undocumented
Declaration
Objective-C
- (DITConnection *)copy;
-
Undocumented
Declaration
Objective-C
- (DITConnection *)copyWithZone:(nullable NSZone *)zone;
-
Undocumented
Declaration
Objective-C
- (NSString *)description;