Repl.WebSocket
0.12.0
See the version list below for details.
dotnet add package Repl.WebSocket --version 0.12.0
NuGet\Install-Package Repl.WebSocket -Version 0.12.0
<PackageReference Include="Repl.WebSocket" Version="0.12.0" />
<PackageVersion Include="Repl.WebSocket" Version="0.12.0" />
<PackageReference Include="Repl.WebSocket" />
paket add Repl.WebSocket --version 0.12.0
#r "nuget: Repl.WebSocket, 0.12.0"
#:package Repl.WebSocket@0.12.0
#addin nuget:?package=Repl.WebSocket&version=0.12.0
#tool nuget:?package=Repl.WebSocket&version=0.12.0
Repl.WebSocket
Website: repl.yllibed.org
Repl.WebSocket runs a Repl Toolkit session over a raw WebSocket connection.
Install
dotnet add package Repl.WebSocket
Run a session (example)
using System.Net.WebSockets;
using Repl;
using Repl.WebSocket;
var app = ReplApp.Create().UseDefaultInteractive();
app.Map("hello", () => "world");
WebSocket socket = /* connected socket */;
return await ReplWebSocketSession.RunAsync(app, socket);
Notes
For an application embedded in an ASP.NET Core host, pass its services explicitly. The request owns the WebSocket session scope:
await ReplWebSocketSession.RunWithServicesAsync(app, socket, context.RequestServices,
new ReplRunOptions { SessionScope = SessionScopeBehavior.CallerOwned },
cancellationToken: context.RequestAborted);
RunAsync uses the Repl application's own services. RunWithServicesAsync borrows the supplied provider; it neither starts host services nor disposes that provider. Its default scope behavior opens a scope per session; use CallerOwned when the provider already represents the connection's scope.
- Supports in-band terminal control messages (
@@repl:*) for terminal/session metadata. - Reassembles fragmented messages before decoding terminal controls and preserves UTF-8 characters split across reads.
- Limits each incoming message to 64 KiB across all its fragments. Oversized messages close the session with
MessageTooBig(1009), interrupting its active command; a peer that ignores the close is aborted after the close deadline. Clients sending larger pastes must split them into separate messages. - The one-second close deadline starts once and remains active during synchronous cancellation callbacks and asynchronous command cleanup. The connection can be aborted while cleanup is pending; the session still waits for that cleanup before releasing its host and borrowed services.
- A terminal Ctrl+C interrupts the active command in that session; it does not stop the host.
- A peer close or dropped connection cancels the session, including a command that is not reading terminal input. The session waits for command cleanup before releasing its host and services. Peer disconnection ends normally; cancellation requested by the caller still propagates to the caller.
Docs
- Cookbook: Hosting Remote Sessions — WebSocket/Telnet setup, DI scopes, auth
- Terminal Integration — capability detection, window size, ANSI
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Repl.Defaults (>= 0.12.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.13.0-dev.2 | 38 | 11/3/2026 |
| 0.12.0 | 90 | 11/3/2026 |
| 0.12.0-dev.265 | 44 | 11/3/2026 |
| 0.12.0-dev.247 | 47 | 11/3/2026 |
| 0.12.0-dev.229 | 46 | 11/3/2026 |
| 0.12.0-dev.228 | 42 | 11/3/2026 |
| 0.12.0-dev.226 | 37 | 11/3/2026 |
| 0.12.0-dev.225 | 44 | 11/3/2026 |
| 0.12.0-dev.221 | 60 | 11/2/2026 |
| 0.12.0-dev.218 | 54 | 11/2/2026 |
| 0.12.0-dev.217 | 62 | 11/2/2026 |
| 0.12.0-dev.216 | 61 | 11/1/2026 |
| 0.12.0-dev.199 | 60 | 10/25/2026 |
| 0.12.0-dev.185 | 64 | 10/22/2026 |
| 0.12.0-dev.184 | 57 | 10/22/2026 |
| 0.12.0-dev.183 | 57 | 10/22/2026 |
| 0.12.0-dev.182 | 66 | 10/22/2026 |
| 0.12.0-dev.181 | 63 | 10/22/2026 |
| 0.12.0-dev.172 | 56 | 10/21/2026 |
| 0.12.0-dev.166 | 66 | 10/21/2026 |