Primitives / foldkit-primitives/net

viewOf

function · packages/primitives/src/net/websocket.ts:78

function viewOf(model: WebSocketModel, wanted: boolean): SocketView

The view of a socket, and whether its page still wants it. An error stands until the page stops wanting the socket; a retry still waiting for its socket reads as connecting, so it answers at once. An error on an open socket always reads as an error.