Skip to main content
Version: 7.9

system.util.getConnectionMode

This function is used in Python Scripting.

Description

Retrieves this client session's current connection mode. 3 is read/write, 2 is read-only, and 1 is disconnected.

Client Permission Restrictions

This scripting function has no Client Permission restrictions.

Syntax

system.util.getConnectionMode()

Parameters

None

Returns

int - The current connection mode for the client.

Scope

Client

Code Examples

Example #1
# This code will set a client to read-only after a timeout of 30 seconds.
# Add this code to a client timer script

mode = system.util.getConnectionMode()
if mode == 3 and system.util.getInactivitySeconds() > 30:
system.util.setConnectionMode(2)