Socket.io: How many concurrent connections can WebSockets handle?

This highly depends on your hardware configuration, what exactly are you doing/processing on the server side and if your system is optimized for many concurrent connections. For example on Linux machine by default you would probably first hit maximum number of opened files or other limits (which can be increased) before running into hardware resources … Read more

socket.io.js not found

Please check your Express version. Express recently is updated to 3.0alpha which API was changed. If 3.0 you can change your code to something likes this: var express = require(‘express’) , http = require(‘http’); var app = express(); var server = http.createServer(app); var io = require(‘socket.io’).listen(server); … server.listen(8000); Same issue with connect: https://github.com/senchalabs/connect/issues/500#issuecomment-4620773

npm install for some packages (sqlite3, socket.io) fail with error MSB8020 on Windows 7

To get around this on my machine I did this command to install the package: npm install socket.io –msvs_version=2012 I found the answer here when having the problem with installing sqlite3 and it worked with socket.io as well. These might be more permanent solutions to fix the problem: Install Visual Studio 2010 Updating the npm … Read more

Memory leak when emitting messages with Socket.IO + Node.js + ZMQ

NodeJs may be use Windows Socket API ( which include memory leaks , old known bug ) https://connect.microsoft.com/VisualStudio/feedback/details/605621/winsock-c-program-causes-memory-leak The problem is the WSACleanup will never be called until you shutdown the network services. ( Mixing up ZMq or Nodejs won’t change that fact ) Now, over the time, you will lock more pages of memory … Read more

Socket IO reconnect?

Well, you have an option here … The first time you initialize the socket value you should connect with io.connect, The next time ( after you’ve called disconnect once ), you should connect back with socket.socket.connect(). So your initSocket, should be something like function initSocket(__bool){ if(__bool){ if ( !socket ) { socket = io.connect(‘http://xxx.xxx.xxx.xxx:8081’, {secure:false}); … Read more

Socket IO Server to Server

Yes, absolutely. Just use the Socket.IO client in your server application directly. https://github.com/LearnBoost/socket.io-client You can install it with npm install socket.io-client. Then to use: var socket = io.connect(‘http://example.com’); socket.on(‘connect’, function () { // socket connected socket.emit(‘server custom event’, { my: ‘data’ }); });

Can’t find socket.io.js [duplicate]

Your Socket.IO server will handle serving the correct version of the Socket.IO client library; you should not be using one from elsewhere on the Internet. From the top example on the Socket.IO website: <script src=”https://stackoverflow.com/socket.io/socket.io.js”></script> This works because you wrap your HTTP server in Socket.IO (see the example at How To Use) and it intercepts … Read more