# Sgcwebsockets Dotnet Apis

> sgcWebSockets .NET Service Integrations

- Skill: `esegece-com/sgcwebsockets-dotnet-apis` (Agent Skill, multi-file: 199 files)
- Install (CLI): `npx skillmds@latest add esegece-com/sgcwebsockets-dotnet-apis`
- Raw SKILL.md: https://api.skillmd.com/api/skills/esegece-com/sgcwebsockets-dotnet-apis/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: esegece-com (https://skillmd.com/u/esegece-com)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/esegece-com/sgcwebsockets-dotnet-apis

---


# sgcWebSockets .NET Service Integrations

Eleven components that speak a third-party realtime or push service: the hub
protocols, the chat platforms, browser push, and the MCP server.

Most of them attach to a `TsgcWebSocketClient` through `Client` and let it own
the socket. The exceptions are `TsgcWebPush_Client`, which is an HTTP client
with no socket of its own, and the two server components, which attach to a
server through `Server`. Read `sgcwebsockets-dotnet` first for the transport and
the threading rule.

## When to use this skill

- Connect to an ASP.NET SignalR or SignalR Core hub
- Connect to a Socket.IO server
- Subscribe to Pusher channels
- Run a Discord bot gateway connection
- Send or receive Telegram or WhatsApp messages
- Send a browser push notification, or serve the subscription endpoint
- Talk to the OpenAI realtime API
- Expose your application's own tools over MCP

## Components in this skill

| Service | Component |
| --- | --- |
| SignalR (ASP.NET) | `TsgcWSAPI_SignalR` |
| SignalR Core | `TsgcWSAPI_SignalRCore` |
| Socket.IO | `TsgcWSAPI_SocketIO` |
| Pusher | `TsgcWSAPI_Pusher` |
| Discord | `TsgcWSAPI_Discord` |
| Telegram | `TsgcTDLib_Telegram` |
| WhatsApp | `TsgcWhatsApp_Client` |
| OpenAI realtime | `TsgcWSAPI_OpenAI` |
| Web Push, sending | `TsgcWebPush_Client` |
| Web Push, serving | `TsgcWSAPIServer_WebPush` |
| MCP server | `TsgcWSAPIServer_MCP` |

## Before you start, ask the developer

Use a structured question tool if your host has one, for example Claude Code's
`AskUserQuestion`. Otherwise ask in chat:

1. **SignalR or SignalR Core?** They are different protocols and different
   components. "SignalR" from an ASP.NET Core project almost always means Core.
2. **Where do the credentials come from?** Every service here needs a token, a
   key or an app id. It goes in configuration, never in source.
3. **Which side are you writing?** Pusher, Discord and Telegram are client
   integrations. Web Push and MCP have a server component too.
4. **Is a hub method call fire-and-forget, or does it need a reply?** That
   decides whether you need the response event wired before the call.

## Quickstart, SignalR Core

```csharp
using esegece.sgcWebSockets;

var client = new TsgcWebSocketClient();
client.Host = "localhost";
client.Port = 5000;

var signalr = new TsgcWSAPI_SignalRCore();
signalr.Client = client;

client.Active = true;
```

`TsgcWSAPI_SignalR` (the classic one) carries its settings on a `SignalR`
options object with `Hubs`, `ProtocolVersion`, `Authentication` and
`UserAgent`. Each component in this skill names its options object after its
service, so `DiscordOptions` on Discord, `Pusher` on Pusher, `OpenAIOptions` on
OpenAI. The API page for the component names the exact one.

## Pusher, Discord and the REST side

Several of these components carry the service's REST calls alongside the socket,
because the service itself splits that way:

- Pusher: `Subscribe(channel, channelType, data)` and
  `Publish(event, channel, channelType, data)` on the socket, plus
  `GetChannel`, `GetChannels` and `GetUsers` over REST.
- Discord: the gateway on the socket, plus `GET_Request`, `POST_Request`,
  `PATCH_Request`, `PUT_Request` and `DELETE_Request` for the REST API, each
  taking a path relative to the Discord API root.

## Web Push is not a socket

`TsgcWebPush_Client.SendNotification(endpoint, publicKey, authSecret, text)`
sends one push message over HTTPS to the endpoint a browser gave you. There is
no connection to open and nothing to keep alive. The three opaque strings come
from the browser's `PushSubscription`, and your server has to have stored them.

`TsgcWSAPIServer_WebPush` is the other half: it attaches to a server and handles
the subscription endpoint.

## Things that catch people out

- Credentials in source. Every component here needs one, and none of them should
  ever appear in a file you commit. Read them from configuration or the
  environment.
- Discord and Telegram bots need the right intents or permissions on the service
  side. A connection that succeeds and then sees no events is usually that, not
  a client bug.
- Socket.IO has protocol versions that are not compatible with each other. The
  server's version decides, and a mismatch looks like a connection that opens
  and immediately closes.
- The OpenAI realtime component holds a live session. `UpdateSession()` pushes
  a changed configuration to it; changing the options object alone does not.
- The Delphi library also has AWS SQS, Google Cloud Pub/Sub, Calendar and FCM
  components, plus the AI and MCP client components. None of those are in this
  assembly. `concepts/coverage.md` is the list.

## Routing

- **API detail**: `reference/api/<Component>.md` has the properties, events and methods, each with its C# signature.
- **Option / enum / delegate types**: property and event types link to `reference/types/<TypeName>.md`.
- **Examples**: `examples/<Component>.md` is a trimmed snippet from the shipped demo; `examples/index.md` maps every component to its demo.
- **Getting started**: `concepts/overview.md` covers the single `using`, the target frameworks and the naming.

## What is documented

Public instance properties, events and methods declared anywhere in the
library's own class chain. Members inherited from the .NET base classes are
left out, as are internals, so a page shows the surface a caller writes
against and nothing else.

If a component you need is not here, read `concepts/coverage.md` in the
`sgcwebsockets-dotnet` skill before assuming a different name for it.
This assembly carries fewer components than the Delphi library, and saying
so is more useful than guessing an API that does not exist.

