public void SendCommand(PBUCONServer server, string command) { if (server.Active) // Only send the heartbeat if the server is meant to be connected { byte[] data = server.GetCommandPacket(command, this.listenIP, this.listenPort); client.Send(data, data.Length, server.EndPoint); } }