public Task HandleAsync(INetworkClient client, ServerPacket packet) { this.logger.LogDebug("Connection List Packet Received"); var allConnections = server.AllConnections(); var header = UTF8Encoding.UTF8.GetBytes("=+ Connection List #" + allConnections.Count + System.Environment.NewLine); client.Send(header, 0, header.Length); foreach (var connection in allConnections) { var data = UTF8Encoding.UTF8.GetBytes(FormatConnectionRow(connection) + System.Environment.NewLine); client.Send(data, 0, data.Length); } var footer = UTF8Encoding.UTF8.GetBytes("=- Connection List" + System.Environment.NewLine); client.Send(footer, 0, footer.Length); return(Task.CompletedTask); }