You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the following code to start my own Cocoa HTTP Server. In order to manually handle the responses I have created my custom HTTPConnection class named PictureHTTPConnection
The problem here is that the PictureHTTPConnection class needs some information in order to handle the HTTP connections. However, I only provide the class and therefore I don't have a reference to the instance. I could do something with global data but this is not very good programming practise.
The best way I can think of is setting the PictureHTTPConnection's delegate to the UIApplicationDelegate so that it can answer any callbacks. :-(
The text was updated successfully, but these errors were encountered:
Why aren't HTTPConnection classes instantiated with a delegate method instead of just handing over the class to httpServer .connectionClass? That way we'd be able to assign to assign a delegate to HTTPConnection and move logic to a controller of our choice instead of having no way to reference anything except self...
I have the following code to start my own Cocoa HTTP Server. In order to manually handle the responses I have created my custom
HTTPConnection
class namedPictureHTTPConnection
The problem here is that the
PictureHTTPConnection
class needs some information in order to handle the HTTP connections. However, I only provide the class and therefore I don't have a reference to the instance. I could do something with global data but this is not very good programming practise.The best way I can think of is setting the
PictureHTTPConnection
's delegate to theUIApplicationDelegate
so that it can answer any callbacks. :-(The text was updated successfully, but these errors were encountered: