Hello On Mon, Sep 29, 2008 at 11:44:52AM -0400, Eric Will wrote: > My question is this: how often could this happen, TODAY? In all the > years I wrote IRC programs, I can't recall EVER getting a partial- > line, and in my two years of messing with XMPP, I can't recall EVER > getting a broken stanza. This should only really happen if the packets > get fragmented very badly, someone's on a really bad connection, or > the client is sending half a stanza at a time over TCP. I think that's > the client's problem. The worst thing that could happen is the client > gets booted and has to reconnect. I don't know if this possibility is > worth costing all that performance. How bad could it be if I chose to > simply ignore this and see what happens?
I can assure you these thinks happen in real life. I sometimes spend a week with few other people and we _together_ have one gprs connection. If some more traffic happens, the stanzas start getting generated faster than the connection can send and they are put into packets one after another, completely forgetting about the original boundaries. You do not want to wait for end of stanza, you could wait tens of seconds. In these conditions, I would not even log in with the way you want to do it. Besides, you are not guaranteed every stanza would fit into usual-sized ethernet packet (you can get 10k stanzas for example when receiving/publishing vCard). You probably should do some tricks like asynchronous sockets (read until you run out of data, get error, return, once select tells you) or threads. -- I never finish anyth Michal 'vorner' Vaner
pgpGSh9E70eD8.pgp
Description: PGP signature
_______________________________________________ JDev mailing list FAQ: http://www.jabber.org/discussion-lists/jdev-faq Forum: http://www.jabberforum.org/forumdisplay.php?f=20 Info: http://mail.jabber.org/mailman/listinfo/jdev Unsubscribe: [EMAIL PROTECTED] _______________________________________________
