Table of Contents

Class SocketConnection

Namespace
Gio
Assembly
Gio-2.0.dll
public class SocketConnection : IOStream, IDisposable, NativeObject, GTypeProvider, InstanceFactory
Inheritance
SocketConnection
Implements
Derived
Inherited Members

Constructors

SocketConnection(params ConstructArgument[])

[Obsolete("Regular C# constructors on native classes will be removed in a future version. Please see the linked documentation for more details. It contains scenarios and possible solutions to prepare for the upcoming changes.", DiagnosticId = "GirCore1007", UrlFormat = "https://gircore.github.io/docs/integration/diagnostic/1007.html")]
public SocketConnection(params ConstructArgument[] constructArguments)

Parameters

constructArguments ConstructArgument[]

SocketConnection(CreationData)

[Obsolete("This constructor is a workaround to keep legacy APIs alive. Do not use it.")]
protected SocketConnection(CreationData data)

Parameters

data CreationData

SocketConnection(SocketConnectionHandle)

protected SocketConnection(SocketConnectionHandle handle)

Parameters

handle SocketConnectionHandle

Fields

SocketPropertyDefinition

public static readonly Property<Socket?, SocketConnection> SocketPropertyDefinition

Field Value

Property<Socket, SocketConnection>

Properties

Socket

public Socket? Socket { get; }

Property Value

Socket

Methods

Connect(SocketAddress, Cancellable?)

[Version("2.32")]
public bool Connect(SocketAddress address, Cancellable? cancellable)

Parameters

address SocketAddress
cancellable Cancellable

Returns

bool

ConnectFinish(AsyncResult)

[Version("2.32")]
public bool ConnectFinish(AsyncResult result)

Parameters

result AsyncResult

Returns

bool

FactoryLookupType(SocketFamily, SocketType, int)

[Version("2.22")]
public static Type FactoryLookupType(SocketFamily family, SocketType type, int protocolId)

Parameters

family SocketFamily
type SocketType
protocolId int

Returns

Type

FactoryRegisterType(Type, SocketFamily, SocketType, int)

[Version("2.22")]
public static void FactoryRegisterType(Type gType, SocketFamily family, SocketType type, int protocol)

Parameters

gType Type
family SocketFamily
type SocketType
protocol int

GetGType()

public static Type GetGType()

Returns

Type

GetLocalAddress()

[Version("2.22")]
public SocketAddress GetLocalAddress()

Returns

SocketAddress

GetRemoteAddress()

[Version("2.22")]
public SocketAddress GetRemoteAddress()

Returns

SocketAddress

GetSocket()

[Version("2.22")]
public Socket GetSocket()

Returns

Socket

IsConnected()

[Version("2.32")]
public bool IsConnected()

Returns

bool

NewFromPointer(nint, bool)

Creates a new managed SocketConnection instance for a given pointer.

public static SocketConnection NewFromPointer(nint ptr, bool ownsHandle)

Parameters

ptr nint
ownsHandle bool

Returns

SocketConnection

NewWithProperties(ConstructArgument[])

Creates a new SocketConnection and sets the properties specified by the construct arguments.

public static SocketConnection NewWithProperties(ConstructArgument[] constructArguments)

Parameters

constructArguments ConstructArgument[]

The properties to set.

Returns

SocketConnection