File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
samples/AdvancedChatRoom/Hub Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 2
2
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
3
4
4
using System . Collections . Generic ;
5
+ using System . Threading . Tasks ;
5
6
using Microsoft . AspNetCore . SignalR ;
6
7
7
8
namespace Microsoft . Azure . SignalR . Samples . AdvancedChatRoom
@@ -18,13 +19,13 @@ public void Echo(string name, string message)
18
19
Clients . Client ( Context . ConnectionId ) . SendAsync ( "echo" , name , message + " (echo from server)" ) ;
19
20
}
20
21
21
- public async void JoinGroup ( string name , string groupName )
22
+ public async Task JoinGroup ( string name , string groupName )
22
23
{
23
24
await Groups . AddToGroupAsync ( Context . ConnectionId , groupName ) ;
24
25
await Clients . Group ( groupName ) . SendAsync ( "echo" , "_SYSTEM_" , $ "{ name } joined { groupName } with connectionId { Context . ConnectionId } ") ;
25
26
}
26
27
27
- public async void LeaveGroup ( string name , string groupName )
28
+ public async Task LeaveGroup ( string name , string groupName )
28
29
{
29
30
await Groups . RemoveFromGroupAsync ( Context . ConnectionId , groupName ) ;
30
31
await Clients . Client ( Context . ConnectionId ) . SendAsync ( "echo" , "_SYSTEM_" , $ "{ name } leaved { groupName } ") ;
You can’t perform that action at this time.
0 commit comments