transmission/macosx/PortChecker.h

34 lines
770 B
C
Raw Permalink Normal View History

// This file Copyright © Transmission authors and contributors.
// It may be used under the MIT (SPDX: MIT) license.
// License text can be found in the licenses/ folder.
2007-09-16 01:02:06 +00:00
2022-04-29 22:51:40 +00:00
#import <Foundation/Foundation.h>
2007-09-16 01:02:06 +00:00
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSUInteger, PortStatus) { //
PortStatusChecking,
PortStatusOpen,
PortStatusClosed,
PortStatusError
};
2007-09-16 01:02:06 +00:00
@protocol PortCheckerDelegate;
2007-09-16 01:02:06 +00:00
@interface PortChecker : NSObject
@property(nonatomic, readonly) PortStatus status;
2007-09-16 01:02:06 +00:00
- (instancetype)initForPort:(NSInteger)portNumber delay:(BOOL)delay withDelegate:(NSObject<PortCheckerDelegate>*)delegate;
- (void)cancelProbe;
2007-09-16 01:02:06 +00:00
@end
@protocol PortCheckerDelegate<NSObject>
- (void)portCheckerDidFinishProbing:(PortChecker*)portChecker;
@end
NS_ASSUME_NONNULL_END