-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathHTTPServer.h
68 lines (49 loc) · 1.43 KB
/
HTTPServer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#import <Foundation/Foundation.h>
@class AsyncSocket;
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 // Mac OS X 10.6
#define IMPLEMENTED_PROTOCOLS <NSNetServiceDelegate>
#elif __IPHONE_OS_VERSION_MIN_REQUIRED >= 40000 // iPhone 4.0
#define IMPLEMENTED_PROTOCOLS <NSNetServiceDelegate>
#else
#define IMPLEMENTED_PROTOCOLS
#endif
@interface HTTPServer : NSObject IMPLEMENTED_PROTOCOLS
{
// Underlying asynchronous TCP/IP socket
AsyncSocket *asyncSocket;
// Standard delegate
id delegate;
// HTTP server configuration
NSURL *documentRoot;
Class connectionClass;
// NSNetService and related variables
NSNetService *netService;
NSString *domain;
NSString *type;
NSString *name;
UInt16 port;
NSDictionary *txtRecordDictionary;
NSMutableArray *connections;
}
- (id)delegate;
- (void)setDelegate:(id)newDelegate;
- (NSURL *)documentRoot;
- (void)setDocumentRoot:(NSURL *)value;
- (Class)connectionClass;
- (void)setConnectionClass:(Class)value;
- (NSString *)domain;
- (void)setDomain:(NSString *)value;
- (NSString *)type;
- (void)setType:(NSString *)value;
- (NSString *)name;
- (NSString *)publishedName;
- (void)setName:(NSString *)value;
- (UInt16)port;
- (void)setPort:(UInt16)value;
- (NSDictionary *)TXTRecordDictionary;
- (void)setTXTRecordDictionary:(NSDictionary *)dict;
- (BOOL)start:(NSError **)errPtr;
- (BOOL)start:(NSError **)errPtr localhostOnly:(BOOL)local;
- (BOOL)stop;
- (NSUInteger)numberOfHTTPConnections;
@end