Struct ByeMessage
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
Codeushort
Properties
Code
public ushort Code { get; init; }
Property Value
Methods
Deconstruct(out ushort)
public void Deconstruct(out ushort Code)
Parameters
Codeushort
Equals(object)
public override bool Equals(object obj)
Parameters
objobject
Returns
Equals(ByeMessage)
public bool Equals(ByeMessage other)
Parameters
otherByeMessage
Returns
GetHashCode()
public override int GetHashCode()
Returns
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
messageReadOnlySpan<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
readerWireReaderThe reader, positioned after the type byte.
Returns
- ByeMessage
The message.
ToString()
public override string ToString()
Returns
Write(ref WireWriter)
Writes the message, type byte included.
public void Write(ref WireWriter writer)
Parameters
writerWireWriterThe writer.
Operators
operator ==(ByeMessage, ByeMessage)
public static bool operator ==(ByeMessage left, ByeMessage right)
Parameters
leftByeMessagerightByeMessage
Returns
operator !=(ByeMessage, ByeMessage)
public static bool operator !=(ByeMessage left, ByeMessage right)
Parameters
leftByeMessagerightByeMessage