ConnectParams

public final class ConnectParams

Connection parameters.

Contains the required parameters and optional configuration for connecting to the server.

Usage example:

// simplest usage (required parameters only)
val params = ConnectParams("your-token")

// with optional configuration
val params = ConnectParams("your-token").apply {
timeLimit = 10
}

NCEngine.connect(params) { userId, error ->
if (error == null) {
// connected successfully
}
}

Parameters

token

user authentication token, required

Constructors

Link copied to clipboard
public ConnectParams ConnectParams(String token)

Properties

Link copied to clipboard
private Boolean reconnectKickEnable

Whether to kick out the reconnecting device when another device is already connected.

Link copied to clipboard
private Integer timeout

Connection timeout in seconds. Defaults to -1 (no limit).

Link copied to clipboard
private final String token

Functions

Link copied to clipboard
public final Boolean getReconnectKickEnable()

Whether to kick out the reconnecting device when another device is already connected.

Link copied to clipboard
public final Integer getTimeout()

Connection timeout in seconds. Defaults to -1 (no limit).

Link copied to clipboard
public final String getToken()
Link copied to clipboard
public final Unit setReconnectKickEnable(Boolean reconnectKickEnable)

Whether to kick out the reconnecting device when another device is already connected.

Link copied to clipboard
public final Unit setTimeout(Integer timeout)

Connection timeout in seconds. Defaults to -1 (no limit).