зеркало из
1
0
Форкнуть 0
AzureSignalR-samples/samples/AdvancedChatRoom
Liangying.Wei 0f822b2385
Update to net7.0 and add a solution file (#235)
* Update to net7.0 and add a solution file

* Update to use latest client js lib

* Update Chatroom to use the latest syntax
2023-06-25 20:19:12 +08:00
..
Auth upgrade to latest SDK and minor cleanup 2018-07-06 13:20:14 +08:00
Controller upgrade to latest SDK and minor cleanup 2018-07-06 13:20:14 +08:00
Hub Fix advaced chatroom 2020-02-13 14:05:04 +08:00
Properties upgrade to .net 6.0 for some samples (#186) 2022-06-01 11:10:18 +08:00
wwwroot Update to net7.0 and add a solution file (#235) 2023-06-25 20:19:12 +08:00
.dockerignore upgrade to .net 6.0 for some samples (#186) 2022-06-01 11:10:18 +08:00
.gitignore Add Advanced Chat Room (#33) 2018-06-19 14:58:43 +08:00
AdvancedChatRoom.csproj Update to net7.0 and add a solution file (#235) 2023-06-25 20:19:12 +08:00
Dockerfile upgrade to .net 6.0 for some samples (#186) 2022-06-01 11:10:18 +08:00
Program.cs Add Advanced Chat Room (#33) 2018-06-19 14:58:43 +08:00
README.md upgrade to .net 6.0 for some samples (#186) 2022-06-01 11:10:18 +08:00
Startup.cs update samples to netcore3.1 2021-02-01 11:24:37 +08:00
appsettings.json Add Advanced Chat Room (#33) 2018-06-19 14:58:43 +08:00

README.md

Azure SignalR Service Advanced Chat Room

Just like ChatRoom sample, you can leverage Azure SignalR Service to handle more clients and offload the connection management part. This sample demonstrates more operations available in Azure SignalR Service.

Now the sample supports:

  • Echo
  • Broadcast
  • Join Group / Leave Group
  • Send to Group / Groups / Group except connection
  • Send to User / Users
  • Cookie / JWT based Authentication
  • Role / Claim / Policy based Authrization

Run the sample locally

Type the following commands to run this app.

dotnet restore
dotnet user-secrets set Azure:SignalR:ConnectionString "<your connection string>"
dotnet run

Quick Deploy via Docker image

You can also deploy this sample via existing docker image

docker run -e Azure__SignalR__ConnectionString="<signalr-connection-string>" \
           -p 5000:80 mcr.microsoft.com/signalrsamples/advancedchatroom:latest

Open the broswer with url localhost:5000, you can see the sample just like Chat Sample but has more operations.