1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-27 18:18:10 +00:00
transmission/macosx/PortChecker.h

31 lines
708 B
C
Raw Normal View History

// This file Copyright © 2006-2022 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
#import <Cocoa/Cocoa.h>
typedef NS_ENUM(unsigned int, port_status_t) { //
PORT_STATUS_CHECKING,
PORT_STATUS_OPEN,
PORT_STATUS_CLOSED,
PORT_STATUS_ERROR
};
2007-09-16 01:02:06 +00:00
@interface PortChecker : NSObject
{
id fDelegate;
port_status_t fStatus;
NSURLConnection* fConnection;
NSMutableData* fPortProbeData;
NSTimer* fTimer;
2007-09-16 01:02:06 +00:00
}
- (instancetype)initForPort:(NSInteger)portNumber delay:(BOOL)delay withDelegate:(id)delegate;
- (void)cancelProbe;
@property(nonatomic, readonly) port_status_t status;
2007-09-16 01:02:06 +00:00
@end