Socket io, where do I get the socket.io.js I need to give to clients?

Problem

Possible Duplicate:
Can't find socket.io.js

Well when using socket.io you need to include the client side using

<script type="text/javascript" src="socket.io/socket.io.js"></script>

But where do I find the "socket.io.js" I need to put into the /socket.io/ folder for the clients?

Problem courtesy of: Wingblade

Solution

https://github.com/LearnBoost/socket.io-client - more information on the best practice for serving the socket.io client js file can be found here: https://github.com/LearnBoost/Socket.IO/wiki/How-do-I-serve-the-client

Solution courtesy of: Bulk

Discussion

The socket.io.js file is generated and offered by the server, hence there's no need to provide it yourself.

If you're using jQuery, you can use the following snippet to get the file

$.getScript('http://localhost:1337/socket.io/socket.io.js', function(){
    //You can now use the io namespace
});

I struggeled with this myself and have posted a question about it earlier on SO.

Discussion courtesy of: thomaux

This recipe can be found in it's original form on Stack Over Flow.