Setting up a background HTTP server

269 views
Skip to first unread message

Raphael

unread,
Feb 24, 2012, 12:23:54 PM2/24/12
to CocoaHTTPServer
Hello all,

We have an HTTP server which responds great while the app is in the
foreground. Next challenge : getting to work while it's in the
background.

We have tried adding this code to the httpserver.m file at the "start"
method :

[asyncSocket performBlock:^{
[asyncSocket enableBackgroundingOnSocket];
}];

This statement is returning NO, and tracing it in, we found the reason
to be because the socket was not yet connected. Which makes sense : we
just finished starting the web server.

Is there a way to set these flags at the server startup, BEFORE any
connection opens ?

Thanks !

mk

unread,
Jul 16, 2012, 3:09:35 PM7/16/12
to cocoaht...@googlegroups.com
I'm curious about this too, same problem

Evgeny

unread,
Aug 7, 2012, 5:19:46 AM8/7/12
to cocoaht...@googlegroups.com
Does anyone has an answer/solution to this issue?

Phuc Hoang

unread,
Aug 7, 2012, 10:39:42 PM8/7/12
to cocoaht...@googlegroups.com
I think you don't need adding code to HTTPServer. I'm  using default code and it can run in background.
--
You received this message because you are subscribed to the Google Groups "CocoaHTTPServer" group.
To post to this group, send email to cocoaht...@googlegroups.com.
To unsubscribe from this group, send email to cocoahttpserv...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/cocoahttpserver/-/Wu6DQWUyE5UJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages