Repository navigation
Conversation
SteffenDE
force-pushed
the
sd-resumable-across-transports
branch
from
November 30, 2026 16:36
3dad3a7 to
f41a1d0
Compare
SteffenDE
force-pushed
the
sd-resumable-across-transports
branch
4 times, most recently
from
December 3, 2026 14:55
797d289 to
5b7228a
Compare
A socket that started over a WebSocket can now continue with long polling, and the other way around, as both transports resume the same session with the same message numbers. On the server, a client switches transports by resuming the session over the other one, which the socket checks with resume/3. The session then detaches the WebSocket it has, and long-poll requests without a resume keep getting 410 while the client uses a WebSocket. The session waits for the client with the window of the transport it continues with, so that a poll waiting for messages does not look like inactivity. Binary messages of a session that started over a WebSocket reach long polling base64-encoded in an object, like all binary long-poll messages. On the client, ResumableWebSocket falls back to long polling when it cannot resume the session over a WebSocket within the longPollFallbackMs option of the socket, for example when a proxy stops allowing WebSockets. It hands the session to a LongPoll, which resumes it with the token and the number of the last message received, and sends the messages the server did not confirm. The socket keeps its connection, and channels stay joined. Parts of this come from #6887.
SteffenDE
force-pushed
the
sd-resumable-across-transports
branch
from
December 3, 2026 15:43
5b7228a to
4340489
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A socket that started over a WebSocket can now continue with long polling, and the other way around, as both transports resume the same session with the same message numbers.
On the server, a client switches transports by resuming the session over the other one, which the socket checks with resume/3. The session then detaches the WebSocket it has, and long-poll requests without a resume keep getting 410 while the client uses a WebSocket. The session waits for the client with the window of the transport it continues with, so that a poll waiting for messages does not look like inactivity. Binary messages of a session that started over a WebSocket reach long polling base64-encoded in an object, like all binary long-poll messages.
On the client, ResumableWebSocket falls back to long polling when it cannot resume the session over a WebSocket within the longPollFallbackMs option of the socket, for example when a proxy stops allowing WebSockets. It hands the session to a LongPoll, which resumes it with the token and the number of the last message received, and sends the messages the server did not confirm. The socket keeps its connection, and channels stay joined.
Parts of this come from #6887.