public async Task sendAll(SendMsg sendMsg) { await Reply.SendAsync("reply", "回复"); // logger.LogInformation($"{ConnectionId}:发送所有人消息"); await Client.All.SendAsync("sendAll", sendMsg.msg); }
public async Task send(SendMsg sendMsg) { await Reply.SendAsync("send", "回复"); //logger.LogInformation($"{ConnectionId}:发送群组消息"); await Client.Group.SendAsync(sendMsg.roomId, "send", sendMsg.msg); }
public async Task send(SendMsg sendMsg) { await Group.AddAsync("11", "2"); await Reply.SendAsync("test", new { msg = "asdasd", ss = "123123" }); await Task.Delay(2); }
public async Task current(SendMsg sendMsg) { logger.LogInformation($"{ConnectionId}:发送给指定的用户"); await Client.Current.SendAsync(sendMsg.connectionId, "current", sendMsg.msg); }
public async Task other(SendMsg sendMsg) { logger.LogInformation($"{ConnectionId}:发送指定连接的之外的其它用户消息"); await Client.Other.SendAsync(sendMsg.connectionId, "other", sendMsg.msg); }
public async Task leave(SendMsg sendMsg) { await Group.RemoveAsync(sendMsg.roomId, ConnectionId); }
public async Task join(SendMsg sendMsg) { await Group.AddAsync(sendMsg.roomId, ConnectionId); }