서버 라이브러리
.NET에서 실시간 WebSocket 사용하기 ASP.NET Core 등 .NET 애플리케이션에서 발행할 수 있습니다.
로그인하면 예제 코드에 내 클러스터 호스트가 채워집니다. 로그인
AI 코딩 에이전트를 사용하시나요? 에이전트 프롬프트 복사 ↓
설치 dotnet add package PusherServer이벤트 발행 var pusher = new Pusher("YOUR_APP_ID" , "YOUR_APP_KEY" , "YOUR_APP_SECRET" , new PusherOptions
{
HostName = "ws.hibira.io" ,
Port = 443 ,
Encrypted = true ,
});
await pusher.TriggerAsync("orders" , "order-shipped" , new { id = 1024 });에이전트 프롬프트 Claude Code, Cursor, GitHub Copilot 등 AI 코딩 에이전트에 붙여 넣으면 위 설정대로 Hibira를 내 .NET 프로젝트에 연동합니다.
Integrate Hibira realtime messaging into this .NET project. Hibira is a hosted WebSocket service that speaks the Pusher Channels protocol, so it works with the standard Pusher libraries (here: PusherServer, https://github.com/pusher/pusher-http-dotnet) pointed at Hibira instead of pusher.com.
Connection details:
- Host: ws.hibira.io
- Port: 443
- TLS: yes (https)
- App ID: YOUR_APP_ID
- App key: YOUR_APP_KEY
- App secret: YOUR_APP_SECRET (server-side only)
What to do:
1. Look at the project first (framework version, package manager, config and env conventions, where similar integrations live) and follow what it already does.
2. Register the Pusher client as a singleton in dependency injection, configured from IConfiguration (environment variables or user secrets, not appsettings.json in git).
3. If the front end subscribes to private or presence channels, add an endpoint that checks the user and returns the result of pusher.Authenticate(channelName, socketId).
4. Read the credentials and host from environment variables or the project's config, and add placeholder entries to .env.example (or its equivalent). Never commit real values, and never send the app secret to a browser or mobile app.
5. Always pass the host, port and TLS setting above. The library defaults to pusher.com; where it requires a cluster, use "ap" (the host decides where it connects).
6. If YOUR_APP_KEY or YOUR_APP_SECRET above is still a placeholder, keep it as an env placeholder and tell me where to fill it in rather than inventing a value.
7. When you are done, list the files you changed and tell me how to check it works, for example by publishing a test event and watching it arrive.
Reference setup from the Hibira .NET guide (adapt it to the project's structure):
Install:
```shell
dotnet add package PusherServer
```
Publish an event:
```csharp
var pusher = new Pusher("YOUR_APP_ID", "YOUR_APP_KEY", "YOUR_APP_SECRET", new PusherOptions
{
HostName = "ws.hibira.io",
Port = 443,
Encrypted = true,
});
await pusher.TriggerAsync("orders", "order-shipped", new { id = 1024 });
```
YOUR_APP_KEY 등 자리 표시자는 대시보드의 값으로 바꾸세요. 에이전트가 환경 변수로 남겨 두게 한 뒤 나중에 채워도 됩니다.
또는 Hibira MCP 서버를 연결하면 에이전트가 앱을 만들고 자격 증명까지 직접 채웁니다. AI 코딩 에이전트 연결 →
대시보드의 앱 키와 시크릿을 사용하세요. 채널, 이벤트, 인가 엔드포인트는 Pusher와 똑같이 동작합니다. 라이브러리 레퍼런스 ↗