Created
May 1, 2019 13:34
-
-
Save ngohungphuc/cbe4ab6805d7fcb7499e45cbcced923c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class ConnectionHub : Hub | |
| { | |
| public async Task Send(string userId) | |
| { | |
| var message = $"Send message to you with user id {userId}"; | |
| await Clients.Client(userId).SendAsync("ReceiveMessage", message); | |
| } | |
| public string GetConnectionId() | |
| { | |
| return Context.ConnectionId; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment