Jump to content
  • Advertisement
Sign in to follow this  

Network Programming Books --Hopefully for iPhone

This topic is 3037 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've read a variety of guides on the net such as Beej's guide, Apple's docs on NSStream and CFStream, and a few others... I'm pretty confident in writing network code, but I have had some issues when constructing real-world game applications where sockets may be closed prematurely. A good example is when the device's battery dies, the user closes the application while logged into a session, etc. It has caused me some broken pipe problems in the past. I've appeared to overcome these issues with select(), but I'm not sure I have used it correctly because I tend to still get these errors.

Does anyone have any good book recommendations for network programming? Right now, I'm working specifically on the iPhone platforms. I'd like to learn more about how real-world game applications with network elements built into it constructed.

NOTE: For all you Apple devs out there, I have been told that NSStream under a runloop is the way to go for network, processor, and battery efficiency. This works fine as long as the iPhone's CPU usage is low enough. With one of my games, my runloop seemed to never receive data on a regular basis from the other iPhone after a match was made between the two on my matchmaking server and they were both connected. Still... I was able to get the two devices to work in a simple demo application using the same code to connect to the server, receive its match data, connect to the other device over the internet, and begin sending and receiving data. The only difference is that this app had nothing else processing on it except for the networking code. None of my game code or engine code was running. I was able to send the device's touch data from the phone to its matched up phone using my Blitz Blok matchmaking architecture...

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!