[Standards] binding to tcp for s2s communication

Max Indelicato MIndelicato at g8wave.com
Fri Mar 7 23:41:13 UTC 2008


Along these same lines, there seems to be no way to have multiple xmpp
servers on one machine. Since we don't know what port the return inbound
TCP connection will be on, we can't associate it with the initial
outbound TCP connection unless we do so by IP which essentially makes
multiple xmpp servers on one system impossible, no?

Max



-----Original Message-----
From: standards-bounces at xmpp.org [mailto:standards-bounces at xmpp.org] On
Behalf Of Max Indelicato
Sent: Friday, March 07, 2008 2:34 PM
To: XMPP Extension Discussion List
Subject: Re: [Standards] binding to tcp for s2s communication

Perfect, that's what I was hoping. I guess I thought that since it
wasn't specified, that there might have been further clarification in
another document.

Thanks for the help!
Max



-----Original Message-----
From: standards-bounces at xmpp.org [mailto:standards-bounces at xmpp.org] On
Behalf Of Dave Cridland
Sent: Friday, March 07, 2008 1:12 PM
To: XMPP Extension Discussion List
Subject: Re: [Standards] binding to tcp for s2s communication

On Fri Mar  7 18:07:10 2008, Max Indelicato wrote:
> So my question is this, what is the proper implementation of this
> standard, taking into consideration that you can't bind a socket in  
> any
> language that I'm aware of, to a port that has already been bound by
> another socket? For example, if I locally bind SERVER1's outbound  
> TCP
> socket to 5269 and make a connection to  SERVER2's inbound TCP  
> socket on
> 5269, then I'm ok. But when SERVER2, tries to then locally bind its
> separate outbound socket to 5269, in an attempt to connect to  
> SERVER1's
> inbound socket, it can't because the outbound socket is already  
> bound to
> that port. This is a problem on both ends really - simply put, you  
> can't
> bind two separate TCP sockets to the same port (inbound and outbound
> being those two separate sockets).

Indeed... But you don't need to use 5269 for outgoing connections -  
it's only used as the destination port. Your source port can be  
anything, and is usually left "unbound" - as in, you let the OS do  
the binding.

Otherwise no, you wouldn't be able to have two TCP connections both  
with source and destination ports being 5269.

Dave.
-- 
Dave Cridland - mailto:dave at cridland.net - xmpp:dwd at jabber.org
  - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
  - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade



More information about the Standards mailing list