Using WebSockets
WebSockets are bidirectional, full-duplex channels that start as HTTP channels and use handshakes to upgrade the channels to WebSockets, with real, two-way TCP communication between the client and the server. The added benefit is that all of this can happen through port 80 and that they are router friendly.
In this recipe, we will see how to create and consume a WebSockets service.
Getting ready
In order to use this recipe, you should have Windows 8 with Visual Studio 2012 installed. WebSockets are only supported natively on Windows 8; see http://msdn.microsoft.com/en-us/library/hh159285.aspx.
How to do it...
Here, we are going to set up our system in order to support WebSockets and implement a basic WebSocket.
- First, we need to validate ...
Get Microsoft .NET Framework 4.5 Quickstart Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.