Development · Native API migration preview · Coverage validation in progress Published release →

API Browser

Member group

Connect

Declaring type: Socket
Module: System.Networking.Sockets
Assembly: System.Networking.dll
Source file: Socket.rvn

Overloads / Variants

Connect

static func Connect(address: IPAddress, port: int, cancellationToken: CancellationToken = default) -> Task<Result<Socket, SocketError>>

Source file: Socket.rvn

Connects to an address value. IPv6 transport is not supported yet. Requests cancellation cooperatively; the task is cancelled after provider acknowledgement.

Parameters

Name Type Description
address IPAddress
port Int32
cancellationToken CancellationToken

Return value

Task<Result<Socket, SocketError>>

Connect

static func Connect(address: string, port: int, cancellationToken: CancellationToken = default) -> Task<Result<Socket, SocketError>>

Source file: Socket.rvn

Requests cancellation cooperatively; the task is cancelled after provider acknowledgement.

Parameters

Name Type Description
address String
port Int32
cancellationToken CancellationToken

Return value

Task<Result<Socket, SocketError>>

Connect

static func Connect(addresses: Sequence<IPAddress>, port: int, cancellationToken: CancellationToken = default) -> Task<Result<Socket, SocketError>>

Source file: Socket.rvn

Tries address values within the existing bounded connection policy. Requests cancellation cooperatively; the task is cancelled after provider acknowledgement.

Parameters

Name Type Description
addresses Sequence<IPAddress>
port Int32
cancellationToken CancellationToken

Return value

Task<Result<Socket, SocketError>>

Connect

static func Connect(addresses: Sequence<string>, port: int, cancellationToken: CancellationToken = default) -> Task<Result<Socket, SocketError>>

Source file: Socket.rvn

Requests cancellation cooperatively; the task is cancelled after provider acknowledgement.

Parameters

Name Type Description
addresses Sequence<String>
port Int32
cancellationToken CancellationToken

Return value

Task<Result<Socket, SocketError>>