When a client connects, a random number called temp is emitted to the client. The above code works when one client connects to the server. Now how can you set a new connection each time? So that if one tab is opened, it gets its own random message back, while when another tab opens, it gets its own random message back.

// you have your socket ready and inside the on('connect'...) you handle a register event where the client passes an id if one exists else you create one.
socket.on('register', function(clientUuid){ // a client requests registration
var id = clientUuid == null? uuid.v4() : clientUuid; // create an id if client doesn't already have one
var nsp;
var ns = "/" + id;
socket.join(id);
var nsp = app.io.of(ns); // create a room using this id that is only for this client
clientToRooms[ns] = nsp; // save it to a dictionary for future use
// set up what to do on connection
nsp.on('connection', function(nsSocket){
console.log('someone connected');
nsSocket.on('Info', function(data){
// just an example
});
});

Client side:

// you already have declared uuid, uuidSocket and have connected to the socket previously so you define what to do on register:
socket.on("register", function(data){
if (uuid == undefined || uuidSocket == undefined) {// first time we get id from server
//save id to a variable
uuid = data.uuid;
// save to localstorage for further usage (optional - only if you want one client per browser e.g.)
localStorage.setItem('socketUUID', uuid);
uuidSocket = io(serverHost + "/" + uuid); // set up the room --> will trigger nsp.on('connect',... ) on the server
uuidSocket.on("Info", function(data){
//handle on Info
});
// initiate the register from the client
socket.emit("register", uuid);

Email codedump link for Using Socket.io with multiple clients connecting to same server