Repl.WebSocket 0.12.0

There is a newer prerelease version of this package available.
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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Repl.WebSocket" Version="0.12.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Repl.WebSocket" Version="0.12.0" />
                    
Directory.Packages.props
<PackageReference Include="Repl.WebSocket" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Repl.WebSocket --version 0.12.0
                    
#r "nuget: Repl.WebSocket, 0.12.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Repl.WebSocket@0.12.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Repl.WebSocket&version=0.12.0
                    
Install as a Cake Addin
#tool nuget:?package=Repl.WebSocket&version=0.12.0
                    
Install as a Cake Tool

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

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
Loading failed