Table of Contents

Struct TransportFrame

Namespace
DSharpPlus.Net.Gateway
Assembly
DSharpPlus.dll

Represents an union between a string message read from the gateway, an exception or a close code.

public readonly record struct TransportFrame

Constructors

TransportFrame(object, WebSocketMessageType)

Creates a new transport frame from the specified data.

Properties

IsSuccess

Indicates whether reading this gateway frame was successful.

MessageType

Methods

TryGetErrorCode(out int)

Attempts to retrieve the error code returned attempting to read this frame.

TryGetException<T>(out T?)

Attempts to retrieve the exception thrown attempting to read this frame.

TryGetMessage(out byte[]?)

Attempts to retrieve the string message received.