having fun with code

Playing with WebSockets

Today I spent some time with Tim at work, playing with WebSockets, a new HTML5 feature that only Google Chrome supports so far. WebSockets allow browsers to create and maintain open direct TCP connections to the server, allowing instant communication in both directions. This means that ajax polling is no longer needed to get updates from the server. Instead, the server can send a message directly to the browser at any point in time while the connection is open. Awesome!

Since we are currently working on a C# .Net project, we searched Internet and found this very cool example that we took as a base for a little multiuser game we were working on today: WebSocket Chat


The potential of WebSockets is incredible, specially for online games and multiuser applications.

Related Posts:

3 Comments to Playing with WebSockets

  1. May 4, 2010 at 11:11 | Permalink

    WebSockets do have massive potential but you don’t need to wait until WebSockets are fully supported. There are already frameworks out there that allow you to do server push.

    I’m presently building a service called Kwwika which allows you to push updates though the Kwwika service and to any connected browser or desktop application sessions.

    At present Kwwika using HTTP streaming but when WebSockets are more widely supported we’ll use that as a way of connecting to the Kwwika service.

    We have a .NET, Silverlight and JavaScript API so feel free to give me a shout if you’d like to have a play with this technology. With our technology you could build, a Sliverlight, .NET desktop and web page (cross platform) chat example. We’ve also got a Java, Flex and C API in the pipeline.

  2. April 19, 2011 at 08:25 | Permalink

    I also see alot of potential in websockets , however i was wondering if you have already used the Kwwika?, would you recommend it?

  3. April 27, 2011 at 17:30 | Permalink

    This new HTML5 feature indeed interesting to play with. Thanks for sharing this post on WebSockets.

  1. By on May 22, 2010 at 22:42

Leave a Reply

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Additional comments powered by BackType

About the blog

This is a blog about development, focused mainly on Javascript but also other languages like python, shell scripts and more.

About the author

Eneko Alonso is a software engineer and UI developer with more than eight years of experience in software and web development. He lives in San Luis Obispo, California and works at LEVEL Studios.

Contact Info

Contact Info

PromoteJS

JavaScript JS Documentation