[jdev] Serverless (peer2peer) jabber sessions

Ulrich Staudinger us at activestocks.de
Wed Apr 6 02:28:36 CDT 2005



Jacek Konieczny schrieb:

>
>IMHO home or small office LAN is a more typical usage for such
>solutions. Such network does not have a dedicated server, workstations
>may be often offline and setting up a server for only a few workstation
>doesn't make sense.
>
>I thing peer-to-peer networking may be useful sometimes, but a way to
>discover (automatically, with no client configuration) a local Jabber
>server for a LAN/domain would be much more useful in many cases -- less
>changes in clients and all XMPP features available.
>
>  
>

Well, a jabber server could listen on a multicast socket and upon 
request return a service tag ( or something alike ) to the bone.

Something like that:

Server listens for <disco> tags on local multicast ip and port 5222

A client sends to the multicast address: 

<iq type='get'
    from='romeo at montague.net/orchard'
    to='plays.shakespeare.lit'
    id='info1'>
  <query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>


The server returns:

<iq type='result'
    from='plays.shakespeare.lit'
    to='romeo at montague.net/orchard'
    id='info1'>
  <query xmlns='http://jabber.org/protocol/disco#info'>
    <identity
        category='conference'
        type='text'
        name='Play-Specific Chatrooms'/>
    <identity
        category='directory'
        type='chatroom'
        name='Play-Specific Chatrooms'/>
    <feature var='jabber:client'/>
    <feature var='jabber:server'/>
  </query>
</iq>
    

IIRC there is the sender information in every multicast packet 
transmitted along with the payload. So the client receiving the iq 
result will simply know, ok - the sender of this packet supports client 
and server connections.



Regards,
Ulrich





More information about the JDev mailing list