Add CultMesh peer exchange catalogs

This commit is contained in:
Meta Vens 2026-05-20 01:35:39 +01:00
commit c612eb4307
10 changed files with 718 additions and 1 deletions

View file

@ -196,6 +196,14 @@ namespace GameCult.Mesh
return new CultMeshVerseCatalog();
}
/// <summary>
/// Creates a local reactive catalog for discovered peers.
/// </summary>
public static CultMeshPeerCatalog CreatePeerCatalog()
{
return new CultMeshPeerCatalog();
}
/// <summary>
/// Attaches Verse discovery responses to a CultMesh node.
/// </summary>
@ -207,6 +215,26 @@ namespace GameCult.Mesh
return new CultMeshVerseDiscoveryServer(node.Server, catalog);
}
/// <summary>
/// Creates a client for fetching Verse catalogs from discovery endpoints.
/// </summary>
public static CultMeshVerseDiscoveryClient CreateVerseDiscoveryClient(
CultMeshVerseDiscoveryClientOptions? options = null)
{
return new CultMeshVerseDiscoveryClient(options);
}
/// <summary>
/// Attaches peer exchange responses to a CultMesh node.
/// </summary>
public static CultMeshPeerExchangeServer ServePeerExchange(
CultMeshNode node,
CultMeshPeerCatalog catalog)
{
if (node == null) throw new ArgumentNullException(nameof(node));
return new CultMeshPeerExchangeServer(node.Server, catalog);
}
/// <summary>
/// Creates a CultNet client configured for CultMesh use.
/// </summary>