Microsoft Azure SignalR SDK for .NET helps you to instantly build Azure applications with real-time messaging functionality, taking advantage of scalable cloud computing resources.
This repository contains the open source subset of the .NET SDK.
Package Name | Target Framework | Version |
---|---|---|
Microsoft.Azure.SignalR | .NET Standard 2.0 | |
Microsoft.Azure.SignalR.Protocols | .NET Standard 2.0 |
Add Azure SignalR package to your project.
dotnet add package Microsoft.Azure.SignalR
You can find samples on how to use Azure SignalR Service at here.
Azure SignalR Service provides a set of REST APIs, so that you can send messages to the connected clients from anywhere using any programming language or any REST client such as Postman. REST APIs' definition is described in this swagger file.
REST APIs are only exposed on port 5002
.
In each HTTP request, an authorization header with a JSON Web Token (JWT) is required to authenticate with Azure SignalR Service.
HS256
, namely HMAC-SHA256, is used as the signing algorithm.
You should use the AccessKey
in Azure SignalR Service instance's connection string to sign the generated JWT token.
aud
(audience) and exp
(expiration time) are required claims in the JWT token.
-
The
aud
claim should be exactly the same as your HTTP request url, trailing slash and query paramters not included. For example, a broadcast request's audience should look like as below:https://example.service.signalr.net:5002/api/v1-preview/hub/myhub
Run build.cmd
or build.sh
without arguments for a complete build including tests.
See Building documents for more details.
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.