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
constructArgumentsConstructArgument[]
SocketConnection(CreationData)
[Obsolete("This constructor is a workaround to keep legacy APIs alive. Do not use it.")]
protected SocketConnection(CreationData data)
Parameters
dataCreationData
SocketConnection(SocketConnectionHandle)
protected SocketConnection(SocketConnectionHandle handle)
Parameters
handleSocketConnectionHandle
Fields
SocketPropertyDefinition
public static readonly Property<Socket?, SocketConnection> SocketPropertyDefinition
Field Value
Properties
Socket
public Socket? Socket { get; }
Property Value
Methods
Connect(SocketAddress, Cancellable?)
[Version("2.32")]
public bool Connect(SocketAddress address, Cancellable? cancellable)
Parameters
addressSocketAddresscancellableCancellable
Returns
ConnectFinish(AsyncResult)
[Version("2.32")]
public bool ConnectFinish(AsyncResult result)
Parameters
resultAsyncResult
Returns
FactoryLookupType(SocketFamily, SocketType, int)
[Version("2.22")]
public static Type FactoryLookupType(SocketFamily family, SocketType type, int protocolId)
Parameters
familySocketFamilytypeSocketTypeprotocolIdint
Returns
FactoryRegisterType(Type, SocketFamily, SocketType, int)
[Version("2.22")]
public static void FactoryRegisterType(Type gType, SocketFamily family, SocketType type, int protocol)
Parameters
gTypeTypefamilySocketFamilytypeSocketTypeprotocolint
GetGType()
public static Type GetGType()
Returns
GetLocalAddress()
[Version("2.22")]
public SocketAddress GetLocalAddress()
Returns
GetRemoteAddress()
[Version("2.22")]
public SocketAddress GetRemoteAddress()
Returns
GetSocket()
[Version("2.22")]
public Socket GetSocket()
Returns
IsConnected()
[Version("2.32")]
public bool IsConnected()
Returns
NewFromPointer(nint, bool)
Creates a new managed SocketConnection instance for a given pointer.
public static SocketConnection NewFromPointer(nint ptr, bool ownsHandle)
Parameters
Returns
NewWithProperties(ConstructArgument[])
Creates a new SocketConnection and sets the properties specified by the construct arguments.
public static SocketConnection NewWithProperties(ConstructArgument[] constructArguments)
Parameters
constructArgumentsConstructArgument[]The properties to set.