Skip to main content

Module socket

Module socket 

Source
Expand description

The websocket in the browser and Workers: a Feed carries one crate::live::Session over the global WebSocket. Subscriptions made while down are sent on the next open; a post made while down is refused, and one cut off by a drop is reported, never resent.

Everything runs on the one JS thread: the socket’s events and the timer call into the feed as tasks of their own, and Feed::next waits for the events they leave.

Structs§

Feed
One websocket connection, kept open. Dropping the feed closes it.

Enums§

Event
What a feed hands back, in the order it happened.
FeedError