Table of Contents

Class WelcomeMessage

Namespace
Typhon.Protocol
Assembly
Typhon.Protocol.dll

WELCOME (0x01): the server's reply to HELLO.

public sealed class WelcomeMessage
Inheritance
WelcomeMessage
Inherited Members

Constructors

WelcomeMessage()

public WelcomeMessage()

Properties

CapsGranted

The optional work granted: a subset of what was requested, known and authorized.

public Capabilities CapsGranted { get; init; }

Property Value

Capabilities

CatalogHash

The catalog's digest (W20).

public ulong CatalogHash { get; init; }

Property Value

ulong

CatalogJson

The canonical catalog JSON, or empty when the client's hash matched and the catalog is skipped.

public byte[] CatalogJson { get; init; }

Property Value

byte[]

Major

The negotiated major.

public ushort Major { get; init; }

Property Value

ushort

Minor

The negotiated minor: the lower of the two sides.

public ushort Minor { get; init; }

Property Value

ushort

ResumeToken

The token to resume this session with, or all zeros when resume is disabled.

public byte[] ResumeToken { get; init; }

Property Value

byte[]

SessionId

The session's identifier.

public uint SessionId { get; init; }

Property Value

uint

Tick

The server's current tick.

public uint Tick { get; init; }

Property Value

uint

TickPeriodUs

The server's current tick period, in microseconds.

public uint TickPeriodUs { get; init; }

Property Value

uint

Methods

Parse(ReadOnlySpan<byte>)

Reads a whole WELCOME message: its type byte, its body, and nothing after it.

public static WelcomeMessage Parse(ReadOnlySpan<byte> message)

Parameters

message ReadOnlySpan<byte>

The message.

Returns

WelcomeMessage

The message.

Read(ref WireReader)

Reads the message body; the type byte has already been read.

public static WelcomeMessage Read(ref WireReader reader)

Parameters

reader WireReader

The reader, positioned after the type byte.

Returns

WelcomeMessage

The message.

Write(ref WireWriter)

Writes the message, type byte included.

public void Write(ref WireWriter writer)

Parameters

writer WireWriter

The writer.