mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-09-06 04:32:06 +00:00
28 lines
1008 B
Objective-C
28 lines
1008 B
Objective-C
/*
|
|
* This is the source code of Telegram for iOS v. 1.1
|
|
* It is licensed under GNU GPL v. 2 or later.
|
|
* You should have received a copy of the license in this archive (see LICENSE).
|
|
*
|
|
* Copyright Peter Iakovlev, 2013.
|
|
*/
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
@interface MTDatacenterAddress : NSObject <NSCoding>
|
|
|
|
@property (nonatomic, strong, readonly) NSString *host;
|
|
@property (nonatomic, strong, readonly) NSString *ip;
|
|
@property (nonatomic, readonly) uint16_t port;
|
|
@property (nonatomic, readonly) bool preferForMedia;
|
|
@property (nonatomic, readonly) bool restrictToTcp;
|
|
@property (nonatomic, readonly) bool cdn;
|
|
@property (nonatomic, readonly) bool preferForProxy;
|
|
@property (nonatomic, readonly) NSData *secret;
|
|
|
|
- (instancetype)initWithIp:(NSString *)ip port:(uint16_t)port preferForMedia:(bool)preferForMedia restrictToTcp:(bool)restrictToTcp cdn:(bool)cdn preferForProxy:(bool)preferForProxy secret:(NSData *)secret;
|
|
|
|
- (BOOL)isEqualToAddress:(MTDatacenterAddress *)other;
|
|
- (BOOL)isIpv6;
|
|
|
|
@end
|