private void SendMessage <T>(WebSocketDataModel <T> model, IWebSocketConnection socket) { model.CurrentDatetime = DateTime.UtcNow; var _modelSerialize = model.Serialize(); socket.Send(_modelSerialize); }
private void SendMessageToAllClients <T>(WebSocketDataModel <T> model) { model.CurrentDatetime = DateTime.UtcNow; var _modelSerialize = model.Serialize(); foreach (var item in SocketClients) { item.Send(_modelSerialize); } }