Support for unrealiable delivery of WebTransport datagrams #5001
-
Hi, I noticed that socket.io has added support for WebTransport using the polyfill provided by fails-components. I tried to find more information about how socket.io is using WebTransport, but couldn't find much beyond the small amount of information in the changelog when it was added. With the current support for WebTransport is it possible to configure socket.io to only use unreliable delivery with datagrams beneath the hood and to not fallback to websockets, http long-polling, etc, such that I would then be able to cancel loading the app entirely if the environment/connection cannot support unreliable delivery with WebTransport? Also, if socket.io can use unreliable delivery through WebTransport, then I assume this would also mean that in such a case socket.io would no longer be guaranteeing the order in which messages are received. Is this correct? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi!
It is not currently possible to use datagrams, as we rely on a bidirectional stream: https://github.com/socketio/engine.io-client/blob/218c3443f6059de43e916e9add09e9f96d529644/lib/transports/webtransport.ts#L43
True. In that case, the order and the actual transmission of the messages would no longer be guaranteed. Reference: https://developer.mozilla.org/en-US/docs/Web/API/WebTransport/datagrams |
Beta Was this translation helpful? Give feedback.
Hi!
It is not currently possible to use datagrams, as we rely on a bidirectional stream: https://github.com/socketio/engine.io-client/blob/218c3443f6059de43e916e9add09e9f96d529644/lib/transports/webtransport.ts#L43
True. In that case, the order and the actual transmission of the messages would no longer be guaranteed.
Refe…