Table of Contents

Class TunnelAddressSync

Namespace
McServerLauncher.Services
Assembly
McServerLauncher.dll

What a server card should say about its addresses, given what the Playit account answered.

public static class TunnelAddressSync
Inheritance
TunnelAddressSync
Inherited Members

Remarks

The card used to keep whatever it had last shown whenever a lookup came back empty. That is right when the account could not be asked — no connection is not news about the tunnel — and wrong when the account answered and the tunnel is simply not there. The second case is what happens after a server's port moves: its old address belonged to the old port, often to another server's tunnel, and kept on screen it made two servers look as if they shared one address.

So the two are told apart here: tunnels == null means "could not ask" and keeps what there was; a list, even an empty one, is the account's answer and is believed.

Methods

Bedrock(IReadOnlyList<PlayitTunnel>?, int)

The Bedrock host, public port and state to show for a crossplay server on port. Null when the account could not be asked, meaning "leave the card as it is, but say it failed".

public static (string Host, string PublicPort, BedrockAddressState State)? Bedrock(IReadOnlyList<PlayitApiService.PlayitTunnel>? tunnels, int port)

Parameters

tunnels IReadOnlyList<PlayitApiService.PlayitTunnel>
port int

Returns

(string Host, string PublicPort, BedrockAddressState State)?

Java(IReadOnlyList<PlayitTunnel>?, int)

The Java address and state to show for a server on port: the TCP tunnel's address, or nothing with the reason. Null when the account could not be asked, meaning "leave the address as it is, but say it failed".

public static (string Address, TunnelAddressState State)? Java(IReadOnlyList<PlayitApiService.PlayitTunnel>? tunnels, int port)

Parameters

tunnels IReadOnlyList<PlayitApiService.PlayitTunnel>
port int

Returns

(string Address, TunnelAddressState State)?