swisspol/GCDWebServer

fail to start server, how to proceed?

Closed this issue · 0 comments

Hi there,

I tried today with the web server framework embed into my code, and when I try to start it via

        BOOL val = [_webServer startWithPort:8095 bonjourName:nil];
        DDLog(@"Staring web server at port %ld... OK? :%d", portNum, val);

it always print

Staring web server at port 8095... OK? :0

I check that 8095 is not in use via lsof -i:8095, and no error message nor debug message in device console log.

How do I proceed? Thanks

UPDATE: I modifyied the code to pirnt the rror while starting:

  NSError *error;
  BOOL val = [self startWithOptions:options error:&error];
  NSLog(@"start server ok? %d, error:%@", val, error);
  return val;

it prints:

start server ok? 0, error:Error Domain=NSPOSIXErrorDomain Code=1 “Operation not permitted” UserInfo={NSLocalizedDescription=Operation not permitted}