Server to server Socket IO messaging
<p><strong>Context:</strong></p>

<ol>
<li>Node.js running a server with <code>require("socket.io");</code></li>
<li>Node.js running another server with <code>require("socket.io-client");</code></li>
<li>Receiving acknowledgements (from the other server) when using the standard :</li>
</ol>

<p><code>io.on("connection", function() { console.log("Something connected."); });</code></p>

<p><strong>Problem:</strong></p>

<p>Unfortunately, I cannot get the CLIENT on either server <strong>both are running client &amp; server socket.io</strong> to emit a message to the server of the other. </p>

<p>I realize it's probably a code error, so I'll include that for correctness' sake, but for the record I'm wondering if there's something I'm doing wrong semantically as opposed to code-wise.</p>

<p><strong>Code: (LoginServer.js)</strong></p>

<pre><code>var app = require('http').createServer();
var io = require('socket.io')(app);
var ioc = require("socket.io-client");

var LoginServer = (function() {
    function LoginServer() {
        this.gameServerSocket = ioc.connect("http://localhost:3031", {reconnect: true});
    }

    LoginServer.prototype.initialize = function() {
        var self = this;

        io.listen(3032);
        io.on("connection", function(socket) {
            socket.emit("connection");
        });

        this.gameServerSocket.on("connection", function() {
            console.log("Game Server Connected!");
            self.gameServerSocket.emit("login", {accountName: "default"});
        });
    }

    return LoginServer;
})();

exports.LoginServer = LoginServer;
</code></pre>

<p><strong>Code: (GameServer.js)</strong></p>

<pre><code>var app = require('http').createServer();
var io = require('socket.io')(app);
var ioc = require("socket.io-client");

var GameServer = (function() {
    function GameServer() {
        this.loginServerSocket = ioc.connect("http://localhost:3032", {reconnect: true});
        this.loginServerSocket.emit("connection");
    }

    GameServer.prototype.initialize = function() {
        var self = this;

        io.listen(3031);
        io.on("connection", function(socket) {
            socket.emit("connection");
        });

        this.LoginServerResponses();
    }

    GameServer.prototype.LoginServerResponses = function() {
        var self = this;
        this.loginServerSocket.on("connection", function() {
            console.log("Login Server Connected!");
        });
        this.loginServerSocket.on("login", function(data) {
            console.log("Login Server:", data);
        });
    }

    return GameServer;
})();

exports.GameServer = GameServer;
</code></pre>