Table of Contents

Enum WebSocketCloseCode

Namespace
OBSStudioClient.Enums
Assembly
OBSClient.dll

1000 - 1011 are System.Net.WebSockets.WebSocketCloseStatus. The others are OBS.

public enum WebSocketCloseCode

Fields

DontClose = 0

For internal use only to tell the request handler not to perform any close action.

NormalClosure = 1000

The connection has closed after the request was fulfilled.

EndpointUnavailable = 1001

Indicates an endpoint is being removed. Either the server or client will become unavailable.

ProtocolError = 1002

The client or server is terminating the connection because of a protocol error.

InvalidMessageType = 1003

The client or server is terminating the connection because it cannot accept the data type it received.

Empty = 1005

No error specified.

InvalidPayloadData = 1007

The client or server is terminating the connection because it has received data inconsistent with the message type.

PolicyViolation = 1008

The connection will be closed because an endpoint has received a message that violates its policy.

MessageTooBig = 1009

The client or server is terminating the connection because it has received a message that is too big for it to process.

MandatoryExtension = 1010

The client is terminating the connection because it expected the server to negotiate an extension.

InternalServerError = 1011

The connection will be closed by the server because of an error on the server.

UnknownReason = 4000

Unknown reason, should never be used.

MessageDecodeError = 4002

The server was unable to decode the incoming websocket message.

MissingDataField = 4003

A data field is required but missing from the payload.

InvalidDataFieldType = 4004

A data field's value type is invalid.

InvalidDataFieldValue = 4005

A data field's value is invalid.

UnknownOpCode = 4006

The specified op was invalid or missing.

NotIdentified = 4007

The client sent a websocket message without first sending Identify message.

AlreadyIdentified = 4008

The client sent an Identify message while already identified.

Once a client has identified, only Reidentify may be used to change session parameters.

AuthenticationFailed = 4009

The authentication attempt (via Identify) failed.

UnsupportedRpcVersion = 4010

The server detected the usage of an old version of the obs-websocket RPC protocol.

SessionInvalidated = 4011

The websocket session has been invalidated by the obs-websocket server.

This is the code used by the Kick button in the UI Session List. If you receive this code, you must not automatically reconnect.

UnsupportedFeature = 4012

A requested feature is not supported due to hardware/software limitations.