[Standards] Originator & Receiver Concept

Max Indelicato MIndelicato at g8wave.com
Thu Mar 13 18:48:19 UTC 2008


Hi Justin, thanks for responding.

I guess my question is, how does each server know who is who? How does each server associate an IP/port combo with a hostname ("example.com")? Is there a lookup done? And if so, is there a standard way of doing that?

So, say that Server1 connects to Server2 as originator to receiver via TCP. Server1 then sends the initiating stream with the 'to' field set as "example.com", but DOESN'T send a 'from' field identifying itself. How does Server2 know what the originator hostname is? I know that Server2 knows Server1's IP, so does Server2 do a DNS lookup to figure out what Server1's IP resolves to (i.e Server1's hostname)?

Thanks,
Max

-----Original Message-----
From: standards-bounces at xmpp.org [mailto:standards-bounces at xmpp.org] On Behalf Of Justin Karneges
Sent: Thursday, March 13, 2008 2:32 PM
To: XMPP Extension Discussion List
Subject: Re: [Standards] Originator & Receiver Concept

On Thursday 13 March 2008 10:27 am, Max Indelicato wrote:
> Server2 is now connecting to Server1 as a response to Server1 connecting
> to Server2, so how does Server2 know what Server1's hostname is, so that
> it may connect as an originator and populate the "to" field in the
> initial stream header?

If Server1 has an initiated connection with Server2, then both sides should 
know who is who (each knows the domain of the other).

I'm not sure what you mean by "in response to Server1's connection".  If you 
want Server2 to initiate a connection back to Server1 just for the heck of 
it, then you should have all of the information you need to do so.  Normally, 
though, Server2 will only initiate a connection back to Server1 when it has a 
stanza to send.  So if a user on Server1 sends an instant message to a user 
on Server2, and then the user on Server2 replies to the message, then Server2 
will naturally connect back to Server1.

-Justin


More information about the Standards mailing list