ReferenceSignals

setconnectionenabled

Enables or disables an existing connection.

Syntax

setconnectionenabled(connection: Connection, enabled: boolean) -> ()

Also available as

set_connection_enabled

Parameters

ParameterTypeDescription
connectionConnectionConnection to change.
enabledbooleanRequested enabled state.

Description

This calls the corresponding Enable or Disable operation; it does not replace the callback. A disconnected connection is not revived by setting enabled to true.

Example

local function pause(connection)
    setconnectionenabled(connection, false)
end

These are Game executor contracts. Check build requirements and session lifetimes before using them.