WebSharper.SignalR

SignalR 11 client bindings for F# — with WebSharper

Source

${notice}

Connection

The connection is configured with HubConnectionBuilder (withUrl, configureLogging, withAutomaticReconnect, withHubProtocol, withServerTimeout, withKeepAliveInterval) and built with build(). The sample hub lives at {origin}/chathub; start WebSharper.SignalR.Server to chat.

state
${state}
connectionId
${connectionId}
baseUrl
${baseUrl}
serverTimeoutInMilliseconds
${serverTimeout}
keepAliveIntervalInMilliseconds
${keepAlive}

Chat hub

on("ReceiveMessage", …) receives server pushes, invoke("SendMessage", …) calls the hub and waits for the result, and send("SendMessage", …) fire-and-forgets it.

Streaming

stream("Counter", …) consumes a server-to-client stream through an IStreamSubscriber; a Subject pushes a client-to-server stream into send("Upload", subject).

${streamStatus}

Connection events

onclose, onreconnecting and onreconnected callbacks, plus the HubConnectionState transitions observed by the sample.