Table of Contents

Class WebsocketConnection

Namespace
Soup
Assembly
Soup-3.0.dll
public sealed class WebsocketConnection : Object, IObject, INotifyPropertyChanged, IDisposable, IHandle, GTypeProvider
Inheritance
WebsocketConnection
Implements
Inherited Members

Constructors

WebsocketConnection(bool, params ConstructArgument[])

protected WebsocketConnection(bool owned, params ConstructArgument[] constructArguments)

Parameters

owned bool
constructArguments ConstructArgument[]

WebsocketConnection(IntPtr, bool)

protected WebsocketConnection(IntPtr ptr, bool ownedRef)

Parameters

ptr IntPtr
ownedRef bool

Fields

ClosedSignal

Signal Descriptor for OnClosed.

public static readonly Signal<WebsocketConnection> ClosedSignal

Field Value

Signal<WebsocketConnection>

ClosingSignal

Signal Descriptor for OnClosing.

public static readonly Signal<WebsocketConnection> ClosingSignal

Field Value

Signal<WebsocketConnection>

ConnectionTypePropertyDefinition

public static readonly Property<WebsocketConnectionType, WebsocketConnection> ConnectionTypePropertyDefinition

Field Value

Property<WebsocketConnectionType, WebsocketConnection>

ErrorSignal

Signal Descriptor for OnError.

public static readonly Signal<WebsocketConnection, WebsocketConnection.ErrorSignalArgs> ErrorSignal

Field Value

Signal<WebsocketConnection, WebsocketConnection.ErrorSignalArgs>

ExtensionsPropertyDefinition

public static readonly Property<IntPtr, WebsocketConnection> ExtensionsPropertyDefinition

Field Value

Property<IntPtr, WebsocketConnection>

IoStreamPropertyDefinition

public static readonly Property<IOStream?, WebsocketConnection> IoStreamPropertyDefinition

Field Value

Property<IOStream, WebsocketConnection>

KeepaliveIntervalPropertyDefinition

public static readonly Property<uint, WebsocketConnection> KeepaliveIntervalPropertyDefinition

Field Value

Property<uint, WebsocketConnection>

MaxIncomingPayloadSizePropertyDefinition

public static readonly Property<ulong, WebsocketConnection> MaxIncomingPayloadSizePropertyDefinition

Field Value

Property<ulong, WebsocketConnection>

MessageSignal

Signal Descriptor for OnMessage.

public static readonly Signal<WebsocketConnection, WebsocketConnection.MessageSignalArgs> MessageSignal

Field Value

Signal<WebsocketConnection, WebsocketConnection.MessageSignalArgs>

OriginPropertyDefinition

public static readonly Property<string?, WebsocketConnection> OriginPropertyDefinition

Field Value

Property<string, WebsocketConnection>

PongSignal

Signal Descriptor for OnPong.

public static readonly Signal<WebsocketConnection, WebsocketConnection.PongSignalArgs> PongSignal

Field Value

Signal<WebsocketConnection, WebsocketConnection.PongSignalArgs>

ProtocolPropertyDefinition

public static readonly Property<string?, WebsocketConnection> ProtocolPropertyDefinition

Field Value

Property<string, WebsocketConnection>

StatePropertyDefinition

public static readonly Property<WebsocketState, WebsocketConnection> StatePropertyDefinition

Field Value

Property<WebsocketState, WebsocketConnection>

UriPropertyDefinition

public static readonly Property<Uri, WebsocketConnection> UriPropertyDefinition

Field Value

Property<Uri, WebsocketConnection>

Properties

ConnectionType

public WebsocketConnectionType ConnectionType { get; }

Property Value

WebsocketConnectionType

Extensions

public IntPtr Extensions { get; }

Property Value

IntPtr

IoStream

public IOStream? IoStream { get; }

Property Value

IOStream

KeepaliveInterval

public uint KeepaliveInterval { get; set; }

Property Value

uint

MaxIncomingPayloadSize

public ulong MaxIncomingPayloadSize { get; set; }

Property Value

ulong

Origin

public string? Origin { get; }

Property Value

string

Protocol

public string? Protocol { get; }

Property Value

string

State

public WebsocketState State { get; }

Property Value

WebsocketState

Uri

public Uri Uri { get; }

Property Value

Uri

Methods

Close(ushort, string?)

public void Close(ushort code, string? data)

Parameters

code ushort
data string

GetCloseCode()

public ushort GetCloseCode()

Returns

ushort

GetCloseData()

public string GetCloseData()

Returns

string

GetConnectionType()

public WebsocketConnectionType GetConnectionType()

Returns

WebsocketConnectionType

GetExtensions()

public List GetExtensions()

Returns

List

GetGType()

public static Type GetGType()

Returns

Type

GetIoStream()

public IOStream GetIoStream()

Returns

IOStream

GetKeepaliveInterval()

public uint GetKeepaliveInterval()

Returns

uint

GetMaxIncomingPayloadSize()

public ulong GetMaxIncomingPayloadSize()

Returns

ulong

GetOrigin()

public string? GetOrigin()

Returns

string

GetProtocol()

public string? GetProtocol()

Returns

string

GetState()

public WebsocketState GetState()

Returns

WebsocketState

GetUri()

public Uri GetUri()

Returns

Uri

SendBinary(Span<byte>)

public void SendBinary(Span<byte> data)

Parameters

data Span<byte>

SendMessage(WebsocketDataType, Bytes)

public void SendMessage(WebsocketDataType type, Bytes message)

Parameters

type WebsocketDataType
message Bytes

SendText(string)

public void SendText(string text)

Parameters

text string

SetKeepaliveInterval(uint)

public void SetKeepaliveInterval(uint interval)

Parameters

interval uint

SetMaxIncomingPayloadSize(ulong)

public void SetMaxIncomingPayloadSize(ulong maxIncomingPayloadSize)

Parameters

maxIncomingPayloadSize ulong

Events

OnClosed

public event SignalHandler<WebsocketConnection> OnClosed

Event Type

SignalHandler<WebsocketConnection>

OnClosing

public event SignalHandler<WebsocketConnection> OnClosing

Event Type

SignalHandler<WebsocketConnection>

OnError

public event SignalHandler<WebsocketConnection, WebsocketConnection.ErrorSignalArgs> OnError

Event Type

SignalHandler<WebsocketConnection, WebsocketConnection.ErrorSignalArgs>

OnMessage

public event SignalHandler<WebsocketConnection, WebsocketConnection.MessageSignalArgs> OnMessage

Event Type

SignalHandler<WebsocketConnection, WebsocketConnection.MessageSignalArgs>

OnPong

public event SignalHandler<WebsocketConnection, WebsocketConnection.PongSignalArgs> OnPong

Event Type

SignalHandler<WebsocketConnection, WebsocketConnection.PongSignalArgs>