Programmed Macs since Inside Mac came in 3-ring binders; programmed iPhones since the first day the SDK was downloadable. 51 apps in the App Store to date, and always looking for new and interesting contracts! Alex is a DZone MVB and is not an employee of DZone and has posted 122 posts at DZone. You can read more from them at their website. View Full User Profile

Embedding an HTTP Server in an App

08.13.2011
| 6178 views |
  • submit to reddit

Now here’s a topic we haven’t posted anything on for multiple years now: embedding an HTTP server in your app. More specifically, making it convenient to do so, with

Java-style servlets in Obj-C using Mongoose Server

… in this post I’ll introduce a wrapper class for the Mongoose web server which tries to emulate the concept of Servlets, common to Java developers… Also note that while the sample project is aimed towards iOS devices, you should be able to use this wrapper in any Objective-C project…

If you’ve got something like a scripted game in progress, this kind of thing can save you a whole lot of cycles during development, indeed. If it looks like something worth looking into further for you, hey here’s the code on github to check out!

References
Published at DZone with permission of Alex Curylo, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)