![]() |
VOOZH | about |
dotnet add package FAkka.WebSocket --version 1.568.101.300
NuGet\Install-Package FAkka.WebSocket -Version 1.568.101.300
<PackageReference Include="FAkka.WebSocket" Version="1.568.101.300" />
<PackageVersion Include="FAkka.WebSocket" Version="1.568.101.300" />Directory.Packages.props
<PackageReference Include="FAkka.WebSocket" />Project file
paket add FAkka.WebSocket --version 1.568.101.300
#r "nuget: FAkka.WebSocket, 1.568.101.300"
#:package FAkka.WebSocket@1.568.101.300
#addin nuget:?package=FAkka.WebSocket&version=1.568.101.300Install as a Cake Addin
#tool nuget:?package=FAkka.WebSocket&version=1.568.101.300Install as a Cake Tool
Akka.WebSocket is a tiny bridge that wires a running Akka.NET actor system to a Suave WebSocket endpoint. It targets both net9.0 and netstandard2.0, so the same package works for .NET 9 applications and legacy .NET Framework hosts.
The library exposes a single entry point: start Suave, hand it an ActorSystem plus the actor that should receive WebSocket JSON/text payloads, and the bridge will keep forwarding messages asynchronously. It also provides a REST-style health check that round-trips through your actor, so downstream load balancers can observe the same infrastructure used by WebSocket clients.
1.564.101.203-win1 treats browser reload, abort, and disposed websocket sends as normal connection lifecycle. The per-client response proxy catches ObjectDisposedException, OperationCanceledException, and disposed AggregateException, logs a warning, then stops the proxy actor so upstream actors can clean subscriptions via Terminated.
1.564.101.203-win2 serializes outbound text-frame sends per browser client. Earlier versions started each send as fire-and-forget async work; high-frequency multi-source push could overlap writes on the same Suave websocket and corrupt the protocol frame, observed as browser Could not decode a text frame as UTF-8 or .NET ClientWebSocket reporting The WebSocket server sent a masked frame.
Ask/blocking calls; messages are Telled to the supplied actor./health sends "healthcheck" to the handler actor and returns its response.net9.0 and netstandard2.0.ServerHandle stops Suave and cancels the WebSocket loop.Install the package from NuGet (package id pending):
dotnet add package Akka.WebSocket
Create an actor that understands your payloads (and optionally the "healthcheck" message) and start the bridge:
open System
open Akka.Actor
open Akka.WebSocketBridge
type EchoActor() =
inherit UntypedActor()
override _.OnReceive msg =
match msg with
| :? string as text when text = "healthcheck" ->
base.Sender.Tell("ok", base.Self)
| :? string as text ->
printfn "client said: %s" text
| _ -> ()
let system = ActorSystem.Create("WebSocketCluster")
let echo = system.ActorOf(Props.Create<EchoActor>(), "ws-echo")
let server =
WebSocketServer.start
system
"ws"
None
(Choice2Of2 ("0.0.0.0", 8080))
(fun _ -> Some echo)
printfn "Listening on ws://0.0.0.0:8080/ws"
Console.ReadLine() |> ignore
server.Stop()
system.Terminate() |> Async.AwaitTask |> Async.RunSynchronously
Connect with any WebSocket client (browser, PowerShell, wscat, etc.) and send UTF-8 text frames; they appear in your actor. Pings are answered automatically, and fragmented/binary frames close the connection.
The repository contains Program.fs, a sample console host that starts:
127.0.0.1:4053),EchoActor, andws://0.0.0.0:8080/ws.Run it with:
dotnet run -f net9.0 --project akka.websocket.fsproj \
-- 0.0.0.0 8080 127.0.0.1 4053 "akka.tcp://WebSocketCluster@127.0.0.1:4053"
Arguments (all optional):
| Position | Meaning | Default |
|---|---|---|
| 0 | HTTP bind address | 0.0.0.0 |
| 1 | HTTP port | 8080 |
| 2 | Cluster hostname | 127.0.0.1 |
| 3 | Cluster port | 4053 |
| 4 | Seed node list | self address |
The demo actor replies "ok" to "healthcheck". The /health endpoint calls into that actor, so you can verify end-to-end readiness:
curl http://localhost:8080/health
# => ok
If the actor is unavailable or throws, the endpoint returns an HTTP 500 with the failure message.
Restore and build:
dotnet restore
dotnet build
Create a NuGet package (produces both target frameworks):
dotnet pack -c Release -o nupkgs
Publish the resulting .nupkg to NuGet with your preferred workflow (dotnet nuget push, GitHub Actions, etc.).
This project is licensed under the terms of the included LICENSE file (MIT).
Suave 2.5.6 and Akka.NET 1.5.54 are distributed under the Apache License 2.0; see THIRD-PARTY-NOTICES.md for details and required notices.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 2 NuGet packages that depend on FAkka.WebSocket:
| Package | Downloads |
|---|---|
|
FAkka.Proc.Supervisor
Package Description |
|
|
PulseTrade.Shared.fs
Package Description |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.568.101.300 | 117 | 6/7/2026 |
| 1.564.101.203-win2 | 144 | 5/4/2026 |
| 1.564.101.203-win1 | 116 | 5/4/2026 |
| 1.564.101.201 | 190 | 4/7/2026 |
| 1.564.101.201-win1 | 224 | 4/18/2026 |
| 1.558.10.102001 | 291 | 1/20/2026 |
| 1.557.10.101002 | 124 | 1/13/2026 |
| 1.557.10.101001 | 278 | 12/23/2025 |
| 1.557.10.101 | 199 | 12/23/2025 |
| 1.0.3 | 229 | 10/23/2025 |
| 1.0.2 | 217 | 10/23/2025 |
| 1.0.1 | 210 | 10/23/2025 |
| 1.0.0 | 208 | 10/23/2025 |