Connection flow for components
The rather simple connection flow for a component is as follows: once a connection is established between the component and the XMPP server, the component sends the following stream opening:
<stream:stream xmlns='jabber:component:accept' xmlns:stream='http://etherx.jabber.org/streams' to='component.mcfly.fam'>
Note that the to
address is the address that the component would like to be called with once it is attached to the server. It is not the address of the XMPP server (which would be mcfly.fam
) as you might expect.
Once the server receives this stream opener and knows that it is configured for a component on this address, it responds with another stream, as follows:
<stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:component:accept' id='88mph' from='component.mcfly.fam'>
In order to prove their identity, components make use of a simple pre-shared string. This is combined with the stream ID sent...