[Telepathy] Link-Local 1-1 stream tubes XMPP protocol

Alban Crequy alban.crequy at collabora.co.uk
Sat Jan 17 19:34:26 PST 2009


Le Fri, 16 Jan 2009 17:48:01 +0000,
Guillaume Desmottes <guillaume.desmottes at collabora.co.uk> a écrit :

> According to Sjoerd, current 1-1 stream tube XMPP protocol is wrong.
> We should design and implement a new one so the next release of Salut
> would have 1-1 stream tube support enabled.
> 
> The protocol implement in Gabble is documented on
> http://people.collabora.co.uk/~cassidy/tubes.html#usecases-p2p
> 
> 
> It doesn't really make sense to re-use it as there is no point to use
> SI in Salut.
> 
> The current protocol implemented in Salut is:
> 
> dev2 offers a stream tube to dev1:
> 
> <iq type="set" from="dev2 at cass-lpt-2" to="dev1 at cass-lpt-2"
> id="20250806682">
>   <tube type="stream" service="x-example" id="927266064"
> xmlns="http://telepathy.freedesktop.org/xmpp/tubes">
>   <transport port="52116"/>
>    <parameters>
>      <parameter name="login" type="str">badger</parameter>
>      <parameter name="a_int" type="int">69</parameter>
>     </parameters>
>   </tube>
> </iq>
> 
> dev2 accepts the tube offer
> 
> <iq type="result" from="dev1 at cass-lpt-2" to="dev2 at cass-lpt-2"
> id="20250806682"/>
> 
> Then dev2 connects to $IP:52116 for each tube connection, where $IP is
> the address announced by dev1's avahi presence (Salut tries each
> address until finding one working).
> 
> When one the peer wants to close the tube, he sends an IQ stanza which
> has to be acked by the other peer.
> 
> <iq to=bla from=foo type='set'>
> <close xmlns="http://telepathy.freedesktop.org/xmpp/tubes"
> id='tube_id'/>
> </iq>

The specs I used for 1-1 tubes in salut is here:
http://people.collabora.co.uk/~alban/tmp/tubes.html#usecases-llp2p

To offer a tube, it uses an <iq> stanza instead of a <message> because:
1/ we don't want the server to store the messages when the contact is
offline.
2/ if the contact does not support tubes, a <iq> reply with error will
be sent automatically, while <message> would just have been ignored.

We have to address theses issues in the new protocol:
- what happens when a contact goes offline and online again: does the
tube offer remains valid?

Other issues?

-- 
Alban



More information about the Telepathy mailing list