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 22// Licensed under the MIT license. See LICENSE file in the project root for full license information.
33
44using System . Collections . Generic ;
5+ using System . Threading . Tasks ;
56using Microsoft . AspNetCore . SignalR ;
67
78namespace Microsoft . Azure . SignalR . Samples . AdvancedChatRoom
@@ -18,13 +19,13 @@ public void Echo(string name, string message)
1819 Clients . Client ( Context . ConnectionId ) . SendAsync ( "echo" , name , message + " (echo from server)" ) ;
1920 }
2021
21- public async void JoinGroup ( string name , string groupName )
22+ public async Task JoinGroup ( string name , string groupName )
2223 {
2324 await Groups . AddToGroupAsync ( Context . ConnectionId , groupName ) ;
2425 await Clients . Group ( groupName ) . SendAsync ( "echo" , "_SYSTEM_" , $ "{ name } joined { groupName } with connectionId { Context . ConnectionId } ") ;
2526 }
2627
27- public async void LeaveGroup ( string name , string groupName )
28+ public async Task LeaveGroup ( string name , string groupName )
2829 {
2930 await Groups . RemoveFromGroupAsync ( Context . ConnectionId , groupName ) ;
3031 await Clients . Client ( Context . ConnectionId ) . SendAsync ( "echo" , "_SYSTEM_" , $ "{ name } leaved { groupName } ") ;
You can’t perform that action at this time.
0 commit comments