use socket.io-browserify
This commit is contained in:
parent
9d066f6d71
commit
df9b15002f
|
@ -13,6 +13,7 @@ module.exports.init = function(io_ext, config) {
|
||||||
if (ios) {
|
if (ios) {
|
||||||
// when a new socket connects
|
// when a new socket connects
|
||||||
ios.sockets.on('connection', function(socket) {
|
ios.sockets.on('connection', function(socket) {
|
||||||
|
console.log("New connection from " + socket.request.connection.remoteAddress + ":" + socket.request.connection.remotePort);
|
||||||
// when it subscribes, make it join the according room
|
// when it subscribes, make it join the according room
|
||||||
socket.on('subscribe', function(topic) {
|
socket.on('subscribe', function(topic) {
|
||||||
if (socket.rooms.length === 1) {
|
if (socket.rooms.length === 1) {
|
||||||
|
|
Loading…
Reference in New Issue