> On 11 Oct 2014, at 22:32, aeneas Winterhalter <[email protected]> wrote: > > Hello, > > I have two node.js backend-servers. Server A has a static IP and can be > reached from anywhere. Server B is behind a gateway and has no static IP. > If I want to send a message from Server B to Server A with Shuttle or > socket.io, I can easy set the static IP of server A as receiver and send my > message. > Now, how can Server A send a response to that message to server B? The server > doesn't know its IP address and even if - that would be the external IP of > the gateway > and not the IP of the node.js server. > Just for understanding: I don't want to send single stand alone messages from > Server B to Server A, it's just about responding. Is there a difference? >
Yes, there is: When you're dealing with a NAT gateway, the initiator has to be the one hidden behind the gateway, unless you want to do special configuration. All this is at the TCP protocol level -- below HTTP, below websockets and socket.io; basically, the requestor can start a connection, and then over that connection, things will flow as you'd expect. Aria -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/F34C11C1-4F3C-44AE-BBF9-F40FBFBD9C3C%40nbtsc.org. For more options, visit https://groups.google.com/d/optout.
