class TcpConnectOptions
source · line 11public
public class TcpConnectOptions internal constructor(
/**
* The delay used to stagger address-family resolution.
*/
public val resolutionDelay: Duration = Duration.milliseconds(50L),
/**
* The delay between starting eligible connection candidates.
*/
public val attemptDelay: Duration = Duration.milliseconds(250L),
/**
* The positive maximum number of simultaneously active TCP connection attempts.
*/
public val maxConcurrentAttempts: Long = 2L,
/**
* An optional deadline for address-family resolution.
*/
public val resolveTimeout: Duration? = None,
/**
* An optional overall deadline for the connection procedure.
*/
public val connectTimeout: Duration? = None,
/**
* An optional non-suspending observer of resolution and connect phase transitions.
*/
public val onEvent: ((TcpConnectEvent) -> Unit)? = None
)
Controls staggered address resolution and connection racing, concurrency, optional phase/overall deadlines, and trace delivery.
Extensions
public fun TcpConnectOptions.copy(configure: TcpConnectOptionsBuilder.() -> Unit = {}): TcpConnectOptions· scoop:scoop.asyncio:0.1.0
property onEvent
source · line 35public
public val onEvent: ((TcpConnectEvent) -> Unit)? = None
get: public read-only
An optional non-suspending observer of resolution and connect phase transitions.
property attemptDelay
source · line 19public
public val attemptDelay: Duration = Duration.milliseconds(250L)
get: public read-only
The delay between starting eligible connection candidates.
property connectTimeout
source · line 31public
public val connectTimeout: Duration? = None
get: public read-only
An optional overall deadline for the connection procedure.
property resolveTimeout
source · line 27public
public val resolveTimeout: Duration? = None
get: public read-only
An optional deadline for address-family resolution.
property maxConcurrentAttempts
source · line 23public
public val maxConcurrentAttempts: Long = 2L
get: public read-only
The positive maximum number of simultaneously active TCP connection attempts.
property resolutionDelay
source · line 15public
public val resolutionDelay: Duration = Duration.milliseconds(50L)
get: public read-only
The delay used to stagger address-family resolution.