Disable -runWithPort: on iOS

This commit is contained in:
Pierre-Olivier Latour
2014-03-22 20:11:52 -07:00
parent 47b8ea5f7c
commit a3894fbf9b
2 changed files with 14 additions and 0 deletions
+10
View File
@@ -53,7 +53,9 @@
}
@end
#if !TARGET_OS_IPHONE
static BOOL _run;
#endif
NSString* GCDWebServerGetMimeTypeForExtension(NSString* extension) {
static NSDictionary* _overrides = nil;
@@ -115,11 +117,15 @@ NSDictionary* GCDWebServerParseURLEncodedForm(NSString* form) {
return parameters;
}
#if !TARGET_OS_IPHONE
static void _SignalHandler(int signal) {
_run = NO;
printf("\n");
}
#endif
@implementation GCDWebServerHandler
@synthesize matchBlock=_matchBlock, processBlock=_processBlock;
@@ -330,6 +336,8 @@ static void _NetServiceClientCallBack(CFNetServiceRef service, CFStreamError* er
@end
#if !TARGET_OS_IPHONE
@implementation GCDWebServer (Extensions)
- (BOOL)runWithPort:(NSUInteger)port {
@@ -351,6 +359,8 @@ static void _NetServiceClientCallBack(CFNetServiceRef service, CFStreamError* er
@end
#endif
@implementation GCDWebServer (Handlers)
- (void)addDefaultHandlerForMethod:(NSString*)method requestClass:(Class)aClass processBlock:(GCDWebServerProcessBlock)block {