SignalP 1.0.0

dotnet add package SignalP --version 1.0.0
                    
NuGet\Install-Package SignalP -Version 1.0.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="SignalP" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SignalP" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="SignalP" />
                    
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 SignalP --version 1.0.0
                    
#r "nuget: SignalP, 1.0.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 SignalP@1.0.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=SignalP&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=SignalP&version=1.0.0
                    
Install as a Cake Tool

🧩 SignalP β€” Lightweight WebSocket Middleware for .NET SignalP is a minimal, developer-friendly alternative to SignalR β€” built on pure WebSockets for real-time communication in .NET applications.

Sometimes, you don’t need a full framework β€” just a socket that works.

πŸš€ Features πŸ”Ή Simple WebSocket-based middleware πŸ”Ή Automatic connection & disconnection handling πŸ”Ή Built-in broadcast, private, and group messaging πŸ”Ή Native WebSocket client support (no SDK required) πŸ”Ή ASP.NET Core integration with Dependency Injection πŸ”Ή Perfect for IoT dashboards, chat, admin tools, and internal systems

πŸ› οΈ Installation Add the package (when published):

dotnet add package SignalP

Or include the source in your project.

βš™οΈ Setup

Program.cs
using SignalP;
var builder = WebApplication.CreateBuilder(args);

builder.Services.AddControllers();
builder.Services.AddSignalP(); // Register SignalP middleware
var app = builder.Build();

app.UseHttpsRedirection();
app.UseSignalP(opts =>
{
    opts.Path = "/signalp"; // WebSocket endpoint
});

app.MapControllers();
app.Run();

πŸ’¬ Client Example (Browser)

const ws = new WebSocket("wss://yourapp.azurewebsites.net/signal?user=JHPoint");
ws.onopen = () => console.log("βœ… Connected");
ws.onmessage = (msg) => console.log("πŸ“© Message:", msg.data);
ws.onclose = () => console.log("❌ Disconnected");

function broadcast(payload) {
  ws.send(JSON.stringify({ type: "broadcast", payload }));
}

broadcast("Hello from browser!");

🧠 Message Structure

SignalP uses a simple JSON message format:
{
  "type": "broadcast",
  "payload": "Hello, world!",
  "target": "optionalConnectionId"
}

Supported types

  • broadcast β€” sends to all clients
  • private β€” sends to a specific connection
  • group β€” sends to clients in a named group

πŸ†š SignalP vs SignalR vs Raw WebSocket | Feature | Raw WebSocket | SignalP | SignalR | | ------------------- | ---------------- | ------------------------- | -------------------------------- | | Transport | WebSocket only | WebSocket only | WebSocket, SSE, Long Polling | | Client | Native WS | Native WS | Requires SDK | | Connection Handling | Manual | Auto IDs & events | Managed framework | | Message Routing | Manual | Broadcast, Private, Group | Hubs & Groups built-in | | Scale-Out | Manual (Redis) | Manual (Redis optional) | Built-in (Azure SignalR Service) | | Complexity | High | Low | Moderate | | Ideal For | Custom protocols | Dashboards, Chat, IoT, Admin | Enterprise, Chat, Collaboration |

🧩 Using SignalP in Controllers You can inject and use SignalPService in your controllers:

[ApiController]
[Route("api/[controller]")]
public class NotifyController : ControllerBase
{
    private readonly SignalPService _signalP;

    public NotifyController(SignalPService signalP)
    {
        _signalP = signalP;
    }
    [HttpPost("send")]
    public async Task<IActionResult> SendMessage([FromBody] string message)
    {
        await _signalP.SendToAllAsync(new { type = "broadcast", payload = message });
        await _signalP.SendToConnectionAsync("abc123", new { payload = "Hello JH!" });        
        await _signalP.SendToGroupAsync("admins", new { payload = "New dashboard alerts!" });   
        await _signalP.AddToGroupAsync("abc123", "admins");
        await _signalP.RemoveFromGroupAsync("abc123", "admins");        
        if (_signalP.TryGetConnectionInfo("abc123", out var info))
        {
            Console.WriteLine($"User {info.User} connected at {info.User}");
        }        
        return Ok();
    }
}

⚑ Running in Azure

  1. Go to App Service β†’ Configuration β†’ General Settings
  2. Set WebSockets = On
  3. Deploy and connect to
wss://yourapp.azurewebsites.net/signal

No Azure SignalR Service required.

🧰 Future Plans πŸ”Έ JWT-based authentication πŸ”Έ Redis Pub/Sub scale-out πŸ”Έ Automatic reconnection support πŸ”Έ Group persistence

πŸ§‘β€πŸ’» Author Joever Monceda Founder & CEO, Repoint Solutions Inc.

License

License: MIT
Copyright (c) 2025 Joever Monceda Linkedin: Joever Monceda
Medium: Joever Monceda
Twitter @_EthanHunt07
Facebook: Ethan Hunt

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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
1.0.0 196 10/14/2025

- Initial release of SignalP 🚀
- WebSocket-based lightweight real-time communication middleware
- Supports groups, broadcast, and targeted messaging
- DI-ready for ASP.NET Core controllers
- Added SendToAllAsync, SendToConnectionAsync, and group management methods