public void WriteTCP(MeterCommand command) { var sender = JsonSerializer.Serialize(command); foreach (var item in server.GetClients()) { server.Send(item, Encoding.UTF8.GetBytes(sender)); } }
public void WriteTCP(MeterCommand command) { var sender = JsonSerializer.Serialize(command); var encrypt = Protector.Encrypt(sender, "secret"); foreach (var item in server.GetClients()) { server.Send(item, Encoding.UTF8.GetBytes(encrypt)); } }