Skip to main content
Version: 0.9.0 (next)

MemberHubInvitation class

A member-hub invitation: a primary hub's signed invitation that joins the QAROS hub on another PC to its session as a member. Created on the primary's PC with Runtime.CreateMemberHubInvitation, carried by your own channel as MemberHubInvitation.Serialize bytes, and used on the joining PC with Runtime.JoinHubAsMember.

Namespace: Quaternar.Qaros · Assembly: Quaternar.Qaros.dll

public sealed class MemberHubInvitation : IDisposable

Implements: IDisposable

Remarks​

The invitation is a secret bearer credential: whoever holds it can join a hub to the primary until it expires or is used up. Send it only over a trusted channel and never log it. The caller owns every instance and disposes it; the calls that take one only borrow it.

Methods​

MemberDescription
Serialize()The invitation as bytes for your channel (UTF-8 JSON, at most 16 KiB); the other PC turns them back with MemberHubInvitation.Deserialize. The bytes carry the secret: never log them.
Deserialize(byte[])Parses an invitation from MemberHubInvitation.Serialize bytes. Strict: bytes with an unknown or missing field, of another kind or version, out of bounds or over 16 KiB fail with StatusCode.MemberInvitationInvalid. The signature is checked by Runtime.JoinHubAsMember, not here.
Dispose()Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Serialize​

The invitation as bytes for your channel (UTF-8 JSON, at most 16 KiB); the other PC turns them back with MemberHubInvitation.Deserialize. The bytes carry the secret: never log them.

public Result<byte[]> Serialize()

Returns: Result<byte[]>

Deserialize​

Parses an invitation from MemberHubInvitation.Serialize bytes. Strict: bytes with an unknown or missing field, of another kind or version, out of bounds or over 16 KiB fail with StatusCode.MemberInvitationInvalid. The signature is checked by Runtime.JoinHubAsMember, not here.

public static Result<MemberHubInvitation> Deserialize(byte[] data)

Parameters

NameTypeDescription
databyte[]

Returns: Result<MemberHubInvitation>

Dispose​

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()