Pubby.Server 0.1.0

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

Pubby.Server

Official .NET Server SDK for Pubby - a self-hosted, Pusher-compatible real-time messaging platform.

Installation

dotnet add package Pubby.Server

Quick Start

using Pubby.Server;

var pubby = new PubbyServer(new PubbyServerOptions
{
    AppId = "your-app-id",
    Key = "your-app-key",
    Secret = "your-app-secret",
    ApiHost = "https://api.pubby.dev" // or your self-hosted instance
});

// Trigger an event
await pubby.TriggerAsync("my-channel", "my-event", new { message = "Hello!" });

// Authenticate private channel
var auth = pubby.AuthenticatePrivateChannel(socketId, "private-channel");

// Authenticate presence channel
var auth = pubby.AuthenticatePresenceChannel(
    socketId,
    "presence-channel",
    userId: "user-123",
    userInfo: new { name = "John" }
);

ASP.NET Core Integration

// Program.cs - Register as singleton
builder.Services.AddSingleton(sp =>
{
    var config = sp.GetRequiredService<IConfiguration>();
    return new PubbyServer(new PubbyServerOptions
    {
        AppId = config["Pubby:AppId"]!,
        Key = config["Pubby:Key"]!,
        Secret = config["Pubby:Secret"]!
    });
});
// Auth endpoint for private/presence channels
[HttpPost("auth")]
public IActionResult Auth([FromBody] AuthRequest request)
{
    if (request.ChannelName.StartsWith("presence-"))
    {
        return Ok(_pubby.AuthenticatePresenceChannel(
            request.SocketId, request.ChannelName, userId, userInfo));
    }

    if (request.ChannelName.StartsWith("private-"))
    {
        return Ok(_pubby.AuthenticatePrivateChannel(
            request.SocketId, request.ChannelName));
    }

    return BadRequest();
}

Features

  • Trigger Events - Send real-time events to channels
  • Channel Authentication - Secure private and presence channels with HMAC-SHA256
  • Channel Info - Query active channels and subscriber counts
  • Pusher Compatible - Drop-in replacement for Pusher server SDK

Channel Types

Prefix Type Auth Required
(none) Public No
private- Private Yes
presence- Presence Yes

Documentation

License

MIT

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.
  • net8.0

    • No dependencies.

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.1.0 401 1/30/2026