Watch a recording of the webinar 'Networking with Sockets in Windows Phone' delivered by MCC Peter Kuhn on November 9th, 2011.
Download the webinar slides (ppt / pptx)
The full source code to the SNTP client demoed in the webinar is now available as part of the open source project "Phone Net Tools" on CodePlex: http://phonenettools.codeplex.com/
In particular, the parts that resemble what has been shown live are the "Sample.Ntp" project and the implementation of the SNTP client which is located in "PhoneNetTools/Ntp/SntpClient.cs". More detailed documentation of this project will be added tomorrow (on CodePlex).
The links listed in the webinar slides are:
- Another sample (simple instant messaging) with full source code with more detailed explanations is available on Peter Kuhn's blog: http://www.pitorque.de/MisterGoodcat/post/Windows-Phone-7-Mango-Sockets.aspx
- Current performance problems with sockets on some phone brands/models (in particular HTC models and the Dell Venue) is described here: http://www.pitorque.de/MisterGoodcat/post/Windows-Phone-7-UDP-performance.aspx
- Another of open source library that demonstrates and uses TCP, UDP and Multicast is named "Phone as a Remote Control" and can be found here: http://paarc.codeplex.com
More detailed background information on the event-based sockets programming approach in WP7 and .NET (I/O Completion Ports) can be found here (very technical):
http://msdn.microsoft.com/en-us/magazine/cc163356.aspx(MSDN Magazine article), and here:
http://msdn.microsoft.com/en-us/library/aa365198(VS.85).aspx (MSDN documentation)
Webinar summary: Windows Phone comes with several built-in options to do networking, for example to access web services or conveniently make http requests. But with the recent "Mango" update, several new options have been added that enable additional scenarios like multiplayer gaming or instant messaging – all of which were hardly possible before, or only with several limitations in place. In this webinar Peter Kuhn reviewed these features and explained how you can use them to enable performant, custom networking in your application.
The contents in particular:
- Sockets: an overview of the new networking features in "Mango"
- TCP vs. UDP: making a decision
- Sample code
- Obstacles during development and testing
- [Optional] Advanced topic: Multicast
As usual, we had a number of awards for our attendees! Check out who grabbed the 3 free SilverlightShow Ebooks 'Getting Ready for the Windows Phone Exam 70-599' (see all SilverlightShow ebooks), and 3 free ebooks 'Windows Phone 7 Silverlight Cookbook' from Packt Publishing!