WCF WebSockets
Update: I have moved the code snippets to a Github gist because of design constraints of my blog. It’s better that way ;)
So one of my new hobbies is using Node.js, which is an uber awesome event driven server side JavaScript engine (whew). Anyway, I hit a point where I wanted to use Node.js with WCF and was thinking how I would be able to interact with my service layer (WCF) to send asynchronous events back to the client in a similiar manner that Node.js does.
WCF WebSockets Prototype
Microsoft has released a prototype which gives initial support for WebSockets, pretty damn cool. Check it out here. Effectively you can now do something like this:
So with some magic, and a few lines of code you can quickly create a WCF host that will listen for connections via an HTML 5 WebSocket and echo back the value. Neat, huh? Now a quick demo of a client.
With Microsoft releasing IE9 today, we’re one step closer to all browsers supporting these insanely cool HTML 5 features.
23 Notes/ Hide
-
maverickveri liked this
-
calvaryoneti liked this
-
ravenousgobl liked this
-
overspreadde liked this
-
daughters45go liked this
-
harbingernor liked this
-
miscarriage8it liked this
-
realityprettydoublepenetration liked this
-
robertschultz posted this
