[jdev] parsing xml (xmpp) with ruby
Michal 'vorner' Vaner
vorner at ucw.cz
Mon Sep 29 02:29:18 CDT 2008
Hello
On Mon, Sep 29, 2008 at 09:19:17AM +0200, Remko Tronçon wrote:
> > I tried to create my own XMPP parser/library (for, ehm, educational
> > purposes). I never come across this issue. As far as I understand it, I
> > get proceed, but no more binary data.
>
> You mean you don't get binary data when you did a read() of
> <proceed/>? You can't rely on that on a TCP connection.
I could rely on that if the server sent them only as a response to _my_
binary data. If it is this:
S: <proceed/>
C: Binary greeting
S: Binary response
Then everything is OK, because I can get ready for binary before I send
my binary part. I'm not sure it is this way, but whenever I looked on a
TCP dump or expected this behaviour, it always worked this way.
Of course, If this could happen too:
S: <proceed/>
S: Some binary data
C: Binary response
Then I would be out of luck and couldn't expect it to come out as two
separate reads.
I expect the proceed is ment as server telling me he is ready for _my_
binary data. It won't send me any binary data unless I do it first.
Have a nice day
--
I have a theory that it's impossible to prove anything, but I can't prove it.
Michal 'vorner' Vaner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <https://www.jabber.org/jdev/attachments/20080929/51a716ac/attachment-0003.pgp>
More information about the JDev
mailing list