"WebSocket is a web technology providing for bi-directional, full-duplex communications channels, over a single Transmission Control Protocol (TCP) socket" (Wikipedia, 2012). The WebSocket protocol has been standardized by the IETF as RFC 6455 (IETF, 2011).
Our WebSocket implementation process started prior to the RFC 6455 standardization. After it was announced, we finalized the implementation and started to test it on our systems. We are very happy to say that we've implemented an incredibly efficient solution for your large-scale development issues.
As of version 2.0, PokeIn supports Hybi00, Hybi10, Hybi17, and RFC 6455 WebSocket protocols and doesn't require any special operating system edition, IIS, or Apache version in order to run. You don't have to use some modified version of a server software or any other 3rd-party solution to make it work. And we've brought this feature under our current licensing system without any additional fee!
In order to begin benefiting from PokeIn's ASP.NET WebSocket feature, you simply need to set the following properties:
By default, this parameter is set to -1 (Disabled). You need to give it a proper number, such as 3333. Just keep in mind that you have to give an access right in your Firewall to whichever TCP port you choose (using inbound rules). To use port 80 for WebSocket connections, you have two available options (note: you only have to pick one!): you can either (1) deploy your application using IIS8 (using our PokeIn45 library) or (2) utilize a secondary Ethernet interface on the same server (using its port 80). If you choose to use PokeIn45, you simply need to define 'CometSettings.ClientSocketURL' and the appropriate PokeIn socket handler in your web.config. Check below for details.
By default, this parameter is set to "IPAddress.None" (Disabled). The PokeIn WebSocket system creates a powerful mirror server internally in order to managesocket traffic. You simply need to define an appropriate IP address for this server or simply use the IP address of your web application. For example, to locally test your application, 127.0.0.1 will work.
By default, this parameter is set to "String.Empty" (No Origin Check). This is a security parameter that's used to limit the callers. If you had an application under http://domain.com and you didn't want to receive a call from another domain or application, then you would assign the value "domain.com" to this parameter and PokeIn will handle the rest for you!
By default, the client's WebSocket URL is the same as the server IP and port address. If you had a different scenario, you may define another IP/Port combination like (http://IPADDRESS:Port). Just remember that the port must be available and accessible from the firewall
Comet AJAX & Sockets Together!
All you have to do is set the previously-mentioned parameters and PokeIn will manage the connections for you! If the client's browser has WebSocket support, PokeIn will use it. Otherwise, it will manage the traffic over Comet AJAX. Likewise, if there is a problem with the browser's WebSocket support (e.g., buggy implementation) PokeIn will automatically handle it for you, switching back to Comet AJAX automatically on the browser.
Cloud Compatible (Azure, EC2, etc.)
Feel free to use PokeIn's WebSocket support with your cloud-powered solutions!
Port 80 over PokeIn45
There are two simple changes you'll need to make on your project: first, you'll have to define the socket handler's URL from CometSettings.ClientSocketURL and, second, you'll have to define the socket handler in web.config.
(Remember: The application pool must be configured to run under 'integrateMode'!)
As an example, let's say we defined the handler (shown below) in our system.webServer/handlers :
<add name="PokeIn_Socket_Handler" verb="*" path="*.poke" type="PokeIn.Comet.PokeInWSHandler, PokeIn45" preCondition="integratedMode" requireAccess="Read" allowPathInfo="true"/>
CometSettings.ClientSocketURL must be something like 'yourdomain.com/socket.poke'.
Note that the type is 'PokeIn45' - not 'PokeIn'.
Be default, PokeIn supports all 'standardized' security features. Moreover, it combines your ASP.NET session keys with the active socket connections and cross-checks the identity of your clients. Also, it prevents other applications from connecting to your web application's socket port.
Hope you like the WebSocket feature as much as we do!