Table of Contents

Struct ByeMessage

Namespace
Typhon.Protocol
Assembly
Typhon.Protocol.dll

BYE (0x85): a clean leave, with 1000 or a code in 4000–4999 — the codes a browser's close() accepts.

public readonly struct ByeMessage : IEquatable<ByeMessage>
Implements
Inherited Members

Constructors

ByeMessage(ushort)

BYE (0x85): a clean leave, with 1000 or a code in 4000–4999 — the codes a browser's close() accepts.

public ByeMessage(ushort Code)

Parameters

Code ushort

Properties

Code

public ushort Code { get; init; }

Property Value

ushort

Methods

Deconstruct(out ushort)

public void Deconstruct(out ushort Code)

Parameters

Code ushort

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

Equals(ByeMessage)

public bool Equals(ByeMessage other)

Parameters

other ByeMessage

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

Parse(ReadOnlySpan<byte>)

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

public static ByeMessage Parse(ReadOnlySpan<byte> message)

Parameters

message ReadOnlySpan<byte>

The message.

Returns

ByeMessage

The message.

Read(ref WireReader)

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

public static ByeMessage Read(ref WireReader reader)

Parameters

reader WireReader

The reader, positioned after the type byte.

Returns

ByeMessage

The message.

ToString()

public override string ToString()

Returns

string

Write(ref WireWriter)

Writes the message, type byte included.

public void Write(ref WireWriter writer)

Parameters

writer WireWriter

The writer.

Operators

operator ==(ByeMessage, ByeMessage)

public static bool operator ==(ByeMessage left, ByeMessage right)

Parameters

left ByeMessage
right ByeMessage

Returns

bool

operator !=(ByeMessage, ByeMessage)

public static bool operator !=(ByeMessage left, ByeMessage right)

Parameters

left ByeMessage
right ByeMessage

Returns

bool