From 73b2c1afb84baec059c671cde39e051c994eff27 Mon Sep 17 00:00:00 2001 From: Guillermo Rauch Date: Mon, 13 Sep 2010 15:29:29 -0700 Subject: [PATCH] Fixed transports link (thanks TomsB) --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 728dffbe..67969bba 100644 --- a/index.html +++ b/index.html @@ -38,7 +38,7 @@ socket.on('connection', function(client){ socket.on('connect', function(){ … }) socket.on('message', function(){ … }) socket.on('disconnect', function(){ … }) -</script>

If you won't leverage Node.JS to serve your files, make sure to call `io.setPath()` with the path to your client side

Supported transports

In order to provide realtime connectivity on every browser, Socket.IO selects the most capable transport at runtime, without it affecting the API.

Supported browsers
Desktop
Mobile
In the wild
Applications
Games
Frameworks / Components
Server Implementations

Besides the official Node.JS server, several implementations have been started for other languages / frameworks that are compatible with the Socket.IO client:

Resources
Articles
FAQ
Does Socket.IO support cross-domain connections?

Absolutely, on every browser!

Why Flash?

Flash is absolutely not requiredfor Socket.IO to function. If Flash is available, it'll be leveraged, as it provides almost the same capabilities as WebSocket. If it's not, the best next transport will be chosen.

I want to host the Socket.IO client myself

If you're not relying on Node.JS serving Socket.IO clientside JavaScript files, make sure you call io.setPath right after including socket.io.js with the location of where you cloned the Socket.IO client repository:

<script src="/the/path/to/socket.io/socket.io.js"></script> 
+</script> 

If you won't leverage Node.JS to serve your files, make sure to call `io.setPath()` with the path to your client side

Supported transports

In order to provide realtime connectivity on every browser, Socket.IO selects the most capable transport at runtime, without it affecting the API.

Supported browsers
Desktop
Mobile
In the wild
Applications
Games
Frameworks / Components
Server Implementations

Besides the official Node.JS server, several implementations have been started for other languages / frameworks that are compatible with the Socket.IO client:

Resources
Articles
FAQ
Does Socket.IO support cross-domain connections?

Absolutely, on every browser!

Why Flash?

Flash is absolutely not requiredfor Socket.IO to function. If Flash is available, it'll be leveraged, as it provides almost the same capabilities as WebSocket. If it's not, the best next transport will be chosen.

I want to host the Socket.IO client myself

If you're not relying on Node.JS serving Socket.IO clientside JavaScript files, make sure you call io.setPath right after including socket.io.js with the location of where you cloned the Socket.IO client repository:

<script src="/the/path/to/socket.io/socket.io.js"></script> 
 <script>io.setPath('/the/path/to/socket.io')</script> 

This is required in order for Socket.IO to find the .swf file required for Flash WebSocket.

Why not just call it `WebSocket` if the actual WebSocket is not present and mimick its API?

Socket.IO does more than WebSocket, even if WebSocket is selected as the transport and the user is browsing your website with an ultra modern browser. Certain features like heartbeats, timeouts and disconnection support are vital to realtime applications but are not provided by the WebSocket API out of the box.

This is akin to jQuery's decision of creating a feature-rich and simple $.ajax API as opposed to normalizing XMLHttpRequest.

Creating our own namespace io.Socket helps also avoid confusion and also makes it naturally extensible. You can add your own shortcut methods and alter the prototype without altering the original standard API.

Can I use Socket.IO with express / connect ?

Sure! Socket.IO only needs access to the http.Server instance of Node. Since all frameworks build on top of that API, Socket.IO is compatible with any framework out of the box.

This is an example of express and Socket.IO:

var app = express.createServer(); 
 app.get('/', function(req, res){ 
    res.send('Hello World');