mirror of https://github.com/msantos/xmppipe
Lower the default buffer size
For ejabberd and the mongooseim fork of ejabbered, 4097 bytes is around the maximum message size before messages are dropped (the extra byte is for libstrophe to put the terminating NULL. Otherwise, with a buffer of 4096, the message will be broken up into 2 parts, with the second consisting of the last byte of the message). With base64 encoding, the message size will increase to 4097 * 4 / 3 bytes. When sending streams of binary data (cat'ing a file over XMPP, ssh over XMPP, ...), stream management will get backlogged and messages will disappear. So halve the default buffer size. Is it too big for other jabber servers? It is one of the mysteries but the "-b" option exists for those.pull/1/head
parent
1975057b6d
commit
c3c83f9d72
Loading…
Reference in New Issue