public void SendAsync(WsMessage message, string password) { if (TryGetWsSession(out IWebSocketSession wsSession)) { if (WsUserName.IsBinarySupported) { wsSession.Context.WebSocket.SendAsync(message.SignToBytes(password), completed: null); } else { wsSession.Context.WebSocket.SendAsync(message.SignToJson(password), completed: null); } } }
public void SendAsync(WsMessage message, string password) { if (TryGetWsSession(out IWsSessionAdapter wsSession)) { if (WsUserName.IsBinarySupported) { wsSession.SendAsync(message.SignToBytes(password)); } else { wsSession.SendAsync(message.SignToJson(password)); } } }
public void SendAsync(WsMessage message) { if (TryGetWsSession(out IWsSessionAdapter wsSession)) { if (WsUserName.IsBinarySupported) { wsSession.SendAsync(message.SignToBytes(this.GetSignPassword())); } else { wsSession.SendAsync(message.SignToJson(this.GetSignPassword())); } } }