Skip to main content

Create connection

Opens a new RCON connection

Function CreateConnection(Val ConnectionParams, Val Logging = Undefined) Export

ParameterCLI optionTypeRequiredDescription
ConnectionParams-Structure Of KeyAndValueConnection parameters. See FormConnectionParameters
Logging-Structure Of KeyAndValueLogging settings. See GetLoggingSettings
Returns

Arbitrary - Connector object or structure with error information

Caution

NOCLI: this method is not available in CLI version

1C:Enterprise/OneScript code example
URL = "127.0.0.1:25565";
Password = "12We...";
WriteTimeout = 20;
ReadTimeout = 20;

ConnectionParams = OPI_RCON.FormConnectionParameters(URL, Password, ReadTimeout, WriteTimeout);
Result = OPI_RCON.CreateConnection(ConnectionParams);
Result
"AddIn.OPI_RCON.Main"