xmppjs / xmpp.js

XMPP for JavaScript
ISC License
2.18k stars 372 forks source link

sendMultiple #876

Closed sonnyp closed 3 years ago

sonnyp commented 3 years ago

https://github.com/xmppjs/xmpp.js/pull/872 doesn't not work with WebSocket

The individual frames of a framed XML stream have a one-to-one correspondence with WebSocket messages and MUST be parsable as standalone XML documents

https://tools.ietf.org/html/rfc7395#section-3.3.3

So instead - we serialize and send multiple stanzas on TCP but send each stanza as a frame on WebSocket. Because of complexitity involved - this feature is available as a new method sendMultiple.