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
In order to provide realtime connectivity on every browser, Socket.IO selects the most capable transport at runtime, without it affecting the API.
Besides the official Node.JS server, several implementations have been started for other languages / frameworks that are compatible with the Socket.IO client:
Absolutely, on every browser!
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.
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
In order to provide realtime connectivity on every browser, Socket.IO selects the most capable transport at runtime, without it affecting the API.
Besides the official Node.JS server, several implementations have been started for other languages / frameworks that are compatible with the Socket.IO client:
Absolutely, on every browser!
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.
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.
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.
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');