<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
   <meta name="Author" content="Dan DeMaggio">
   <meta name="GENERATOR" content="Mozilla/4.5 [en] (WinNT; I) [Netscape]">
   <title>Jabber Jabber</title>
</head>
<body>
Here's some conversations using snapshot 915778725 grabbed
on 1/8/99.
<p>List of characters:
<table BORDER >
<tr>
<td>T</td>

<td>jabber.transport</td>
</tr>

<tr>
<td>JB&nbsp;&nbsp;&nbsp;</td>

<td>jabberbox</td>
</tr>

<tr>
<td>C</td>

<td>client</td>
</tr>
</table>

<p>Scene 1: Transport startup
<br>&nbsp;
<table BORDER WIDTH="100%" >
<tr VALIGN=TOP>
<td>T-JB</td>

<td>&lt;r handshake='jabber'>
<br>&lt;/r></td>

<td>T connects to JB and announces itself (should JB announce itself first?)
as a jabber transport.</td>
</tr>

<tr VALIGN=TOP>
<td>JB-T</td>

<td>&lt;j type='config'>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;name>localhost&lt;/name>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;alias>JABBER&lt;/alias>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;alias>localhost&lt;/alias>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;listen>198.45.23.4&lt;/listen>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/!>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;modules>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;basic>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;cache>/var/tmp/jabber.basic.cache&lt;/cache>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;user>username@password&lt;/user>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;user>test@test&lt;/user>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;user>someone@asdf&lt;/user>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/basic>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;mysql>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;host>localhost&lt;/host>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;db>jabbers&lt;/db>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;user>jab&lt;/user>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;pass>P0wCheez&lt;/pass>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/mysql>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/modules>
<br>&lt;/j></td>

<td>JB sends config packet that was originally in &lt;jabber> tags. [ perl
announces itself as 'perl' and gets the stuff in &lt;perl> tags. ]</td>
</tr>

<tr VALIGN=TOP>
<td>T-JB</td>

<td>&lt;r handshake='jabber'>
<br>&nbsp;&nbsp;&nbsp; &lt;alias>localhost&lt;/alias>
<br>&nbsp;&nbsp;&nbsp; &lt;alias>localhost&lt;/alias>
<br>&nbsp;&nbsp;&nbsp; &lt;alias>JABBER&lt;/alias>
<br>&nbsp;&lt;/r></td>

<td>T re-announces itself (?)</td>
</tr>

<tr VALIGN=TOP>
<td>JB-T</td>

<td>&lt;j type='config'>
<br>&nbsp;&nbsp; [ Same as above ]
<br>&lt;/j></td>

<td>get config packet. Again?</td>
</tr>
</table>

<p>Scene 2: Client connects to jabberbox
<br>&nbsp;
<table BORDER WIDTH="100%" >
<tr>
<td>T-C</td>

<td></td>

<td>JB sez nothing. Usually, when you connect to a server, they announce
themselves. Well, except HTTP.</td>
</tr>

<tr VALIGN=TOP>
<td>C-T</td>

<td>&lt;j type='connection'>
<br>&nbsp;&nbsp;&nbsp; &lt;ver>Jabber CLI Client 0.5 Dev&lt;/ver>
<br>&nbsp;&nbsp;&nbsp; &lt;protocol>19990101&lt;/protocol>
<br>&lt;/j></td>

<td>C announces (registers?) itself</td>
</tr>

<tr VALIGN=TOP>
<td>JB-T</td>

<td>&lt;j type='connection'>
<br>&nbsp;&nbsp; &lt;name>localhost&lt;/name>
<br>&nbsp;&nbsp; &lt;ver>JabberBox 0.5 Dev&lt;/ver>
<br>&nbsp;&nbsp; &lt;protocol>19990101&lt;/protocol>
<br>&lt;/j></td>

<td>T announces itself</td>
</tr>
</table>

<p>Scene 3: Client logs in
<br>&nbsp;
<table BORDER WIDTH="100%" >
<tr VALIGN=TOP>
<td>C-T</td>

<td>&lt;j type='login'>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;user>dmag&lt;/user>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;pass>xxxx&lt;/pass>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;nick>fork&lt;/nick>
<br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;/j></td>

<td>Is the nick the place where we're supposed to put "work" or "home"?
And how do we send a message to a particular nick?</td>
</tr>

<tr VALIGN=TOP>
<td>T-C</td>

<td></td>

<td>I think T should ack the login. On a slow link/server, C might assume
that T is happy when it's not.</td>
</tr>
</table>

<p>Scene 4: Client sends a simple message
<br>&nbsp;
<table BORDER WIDTH="100%" >
<tr VALIGN=TOP>
<td>C-T</td>

<td>&lt;j type='message'>
<br>&nbsp;&nbsp; &lt;to>dmag&lt;/to>
<br>&nbsp;&nbsp; &lt;say>to dmag&lt;/say>
<br>&lt;/j></td>

<td>note that jabberbox is not involved. Cool.</td>
</tr>

<tr VALIGN=TOP>
<td>T-C</td>

<td>&lt;j type='message'>
<br>&nbsp;&nbsp; &lt;from name='fork'>dmag&lt;/from>
<br>&nbsp;&nbsp; &lt;say>to dmag&lt;/say>
<br>&lt;/j></td>

<td>Shouldn't that be "nick=fork"?</td>
</tr>
</table>

<p>Scene 5: client sends a message thru localhost
<br>&nbsp;
<table BORDER WIDTH="100%" >
<tr VALIGN=TOP>
<td>C-T</td>

<td>&lt;j type='message'>
<br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;to>dmag@localhost&lt;/to>
<br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;say>zool is coming&lt;/say>
<br>&nbsp;&nbsp;&nbsp; &lt;/j></td>

<td></td>
</tr>

<tr VALIGN=TOP>
<td>T-JB</td>

<td>&lt;r from='localhost' to='localhost'>
<br>&nbsp;&nbsp;&nbsp; &lt;j type='message' from='dmag@localhost' nick='fork'>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;to>dmag&lt;/to>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;say>zool is coming&lt;/say>
<br>&nbsp;&nbsp; &lt;/j>
<br>&lt;/r></td>

<td>T forwards it to JB to send it to localhost</td>
</tr>

<tr VALIGN=TOP>
<td>JB-T</td>

<td>&lt;j type='message' from='dmag@localhost' nick='fork'>
<br>&nbsp;&nbsp; &lt;to>dmag&lt;/to>
<br>&nbsp;&nbsp; &lt;say>zool is coming&lt;/say>
<br>&lt;/j></td>

<td>JB send it to back to T without the localhost..</td>
</tr>

<tr VALIGN=TOP>
<td>T-C</td>

<td>&lt;j type='message'>
<br>&nbsp;&nbsp; &lt;from name='fork'>dmag@localhost&lt;/from>
<br>&nbsp;&nbsp; &lt;say>zool is coming&lt;/say>
<br>&lt;/j></td>

<td>Shouldn't that be nick=fork?</td>
</tr>
</table>

<p>Scene 6: Client sends message to his own nick@localhost
<br>&nbsp;
<table BORDER WIDTH="100%" >
<tr VALIGN=TOP>
<td>C-T</td>

<td>&lt;j type='message'>
<br>&nbsp;&nbsp; &lt;to>fork@localhost&lt;/to>
<br>&nbsp;&nbsp; &lt;say>fork message here&lt;/say>
<br>&lt;/j></td>

<td></td>
</tr>

<tr VALIGN=TOP>
<td>T-JB</td>

<td>&lt;r from='localhost' to='localhost'>
<br>&nbsp;&nbsp; &lt;j type='message' from='dmag@localhost' nick='fork'>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;to>fork&lt;/to>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;say>fork message here&lt;/say>
<br>&nbsp;&nbsp; &lt;/j>
<br>&lt;/r></td>

<td>T forwards it to JB because it sez localhost</td>
</tr>

<tr VALIGN=TOP>
<td>JB-T</td>

<td>&lt;j type='message' from='dmag@localhost' nick='fork'>
<br>&nbsp; &lt;to>fork&lt;/to>
<br>&nbsp; &lt;say>fork message here&lt;/say>
<br>&lt;/j></td>

<td>JB strips the localhost and sends it back to T</td>
</tr>

<tr VALIGN=TOP>
<td>T-JB</td>

<td>&lt;r from='localhost' to='localhost'>
<br>&nbsp;&nbsp; &lt;j type='message' from='system@localhost'>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;to name='fork'>dmag&lt;/to>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;ext>error&lt;/ext>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;subject>Message Rejected&lt;/subject>&lt;say>Your
message to fork could not be delivered, either the recipient doesn&amp;apos;t
exist, or it couldn&amp;apos;t be stored until they return online.
<br>Message:
<br>fork message here&lt;/say>
<br>&nbsp;&nbsp; &lt;/j>
<br>&lt;/r></td>

<td>I guess T doesn't deliver to nicks.
<p>Note the XML apostrophe.
<p>If T knows it's for dmag, why does he send it to JB?</td>
</tr>

<tr VALIGN=TOP>
<td>JB-T</td>

<td>&lt;j type='message' from='system@localhost'>
<br>&nbsp;&nbsp; &lt;to name='fork'>dmag&lt;/to>
<br>&nbsp;&nbsp; &lt;ext>error&lt;/ext>
<br>&nbsp;&nbsp; &lt;subject>Message Rejected&lt;/subject>
<br>&nbsp;&nbsp; &lt;say>Your message to fork could not be delivered, either
the recipient doesn&amp;apos;t exist, or it couldn&amp;apos;t be stored
until they return online.
<br>Message:
<br>fork message here&lt;/say>
<br>&lt;/j></td>

<td>JB just returns the exact same message... I'm getting Deja Vu ;)</td>
</tr>

<tr VALIGN=TOP>
<td>T-C</td>

<td>&lt;j type='message'>
<br>&nbsp;&nbsp; &lt;from>system@localhost&lt;/from>
<br>&nbsp;&nbsp; &lt;ext>error&lt;/ext>
<br>&nbsp;&nbsp; &lt;subject>Message Rejected&lt;/subject>
<br>&nbsp;&nbsp; &lt;say>Your message to fork could not be delivered, either
the recipient doesn&amp;apos;t exist, or it couldn&amp;apos;t
<br>&nbsp;be stored until they return online.
<br>Message:
<br>fork message here&lt;/say>
<br>&lt;/j></td>

<td>Whew. It finally gets back to the client.</td>
</tr>
</table>

<p>Scene 7: Message to nowhere
<br>&nbsp;
<table BORDER WIDTH="100%" >
<tr VALIGN=TOP>
<td>C-T</td>

<td>&lt;j type='message'>
<br>&nbsp;&nbsp; &lt;to>dmag@nowhere&lt;/to>
<br>&nbsp;&nbsp; &lt;say>nothing&lt;/say>
<br>&lt;/j></td>

<td></td>
</tr>

<tr VALIGN=TOP>
<td>T-JB</td>

<td>&lt;r from='localhost' to='nowhere'>
<br>&nbsp;&nbsp; &lt;j type='message' from='dmag@localhost' nick='fork'>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;to>dmag&lt;/to>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;say>nothing&lt;/say>
<br>&nbsp;&nbsp; &lt;/j>
<br>&lt;/r></td>

<td>nowhere's not here, so forward to JB.</td>
</tr>

<tr VALIGN=TOP>
<td>JB-T</td>

<td>&lt;j nick='fork' from='dmag@localhost' type='error' error_type='message'
error='Server Name Resolution Failed'>
<br>&nbsp;&nbsp; &lt;to>dmag&lt;/to>
<br>&nbsp;&nbsp; &lt;say>nothing&lt;/say>
<br>&lt;/j></td>

<td>JB doesn't know where it is</td>
</tr>

<tr VALIGN=TOP>
<td>T-C</td>

<td></td>

<td>Oops, T&nbsp; doesn't return anyting, and C mistakenly prints "message
delivered".&nbsp; Maybe we need some acks here? Hint hint.</td>
</tr>
</table>

<br>&nbsp;
</body>
</html>