← ClaudeAtlas

aspnet-signalrlisted

ASP.NET Core SignalR for real-time hubs, clients, groups, and streaming. Covers strongly-typed hubs and hub filters. USE WHEN: user mentions "SignalR", "real-time", "WebSocket", "hubs", "real-time notifications", ".NET WebSocket", "push notifications" DO NOT USE FOR: Spring WebSocket - use `spring-websocket`, Socket.IO - use Angular/React WebSocket patterns
claude-dev-suite/claude-dev-suite · ★ 33 · AI & Automation · score 80
Install: claude install-skill claude-dev-suite/claude-dev-suite
# ASP.NET Core SignalR - Quick Reference > **Deep Knowledge**: Use `mcp__documentation__fetch_docs` with technology: `signalr` for comprehensive documentation. ## Hub Setup ```csharp // Program.cs builder.Services.AddSignalR(); app.MapHub<ChatHub>("/hubs/chat"); ``` ## Strongly-Typed Hub ```csharp public interface IChatClient { Task ReceiveMessage(string user, string message); Task UserJoined(string user); Task UserLeft(string user); } public class ChatHub : Hub<IChatClient> { public async Task SendMessage(string user, string message) { await Clients.All.ReceiveMessage(user, message); } public async Task JoinRoom(string room) { await Groups.AddToGroupAsync(Context.ConnectionId, room); await Clients.Group(room).UserJoined(Context.User?.Identity?.Name ?? "Anonymous"); } public async Task LeaveRoom(string room) { await Groups.RemoveFromGroupAsync(Context.ConnectionId, room); await Clients.Group(room).UserLeft(Context.User?.Identity?.Name ?? "Anonymous"); } public override async Task OnConnectedAsync() { await base.OnConnectedAsync(); } public override async Task OnDisconnectedAsync(Exception? exception) { await base.OnDisconnectedAsync(exception); } } ``` ## Sending from Outside Hub ```csharp public class NotificationService { private readonly IHubContext<ChatHub, IChatClient> _hubContext; public NotificationService(IHubContext<Chat