Modularize CultMesh transport planes
This commit is contained in:
parent
434db81e43
commit
c16163a82f
19 changed files with 2162 additions and 171 deletions
|
|
@ -318,6 +318,9 @@ namespace GameCult.Networking
|
|||
return new RudpCultNetSchemaClient(runtimeId, connectionId, connectPayload, maxFragmentBytes, resendDelayMs);
|
||||
}
|
||||
|
||||
/// <summary>Creates the length-prefixed TCP schema client.</summary>
|
||||
public static ICultNetSchemaClient CreateTcpFramed() => new TcpFramedCultNetSchemaClient();
|
||||
|
||||
/// <summary>
|
||||
/// Creates the default schema client adapter for an advertised endpoint URI.
|
||||
/// </summary>
|
||||
|
|
@ -341,12 +344,18 @@ namespace GameCult.Networking
|
|||
return CreateRudp();
|
||||
}
|
||||
|
||||
if (string.Equals(uri.Scheme, "cultnet+tcp", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return CreateTcpFramed();
|
||||
}
|
||||
|
||||
if (string.Equals(uri.Scheme, "cultnet", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return CreateLiteNetLib(security, configureClient);
|
||||
}
|
||||
|
||||
throw new FormatException($"CultNet endpoint '{endpoint}' must use cultnet://host:port or rudp://host:port.");
|
||||
throw new FormatException(
|
||||
$"CultNet endpoint '{endpoint}' must use cultnet+tcp://host:port, cultnet://host:port, or rudp://host:port.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue