1

I'm using CocoaHTTPServer, and I'm wondering that can we use it to catch when a browser (eg: an UIWebView in our app) request to load a local html, and when the Socket response to the browser?

  • Now, as far as I uderstand. When UIWebView request to load a local html file:

    • It's the same as a http GET request (and it's waiting for the response?)
    • The socket on the server receive that GET request then write some response to the web view (if we could catch when the socket response to web view, then we can modify the response, right?)
  • In Android, if I open a Socket, it'll listen to all requests on the app (even if it's just a web view need to load a local html file). Can we do that in iOs?

  • And the last, if I have a html file that has an image, audio and video path. When the UIWebView load the html file, it load the html code first (I'm not sure about this), the next is the media content, so can I modify the media file right before the UIWebView load these media file (image, audio, video file can be convert to NSData, I modify the data and send the data for web view to load it)?

PLUS

I'm using AFNetworking 2.0 too, but for other purposes. I just want to know that does AFNetworking 2.0 support those socket streaming as mentioned above?

JozackOverFlow
  • 267
  • 4
  • 19

0 Answers0