Skip to main content

Close connection

Close previously created connection

Function CloseConnection(Val Connection) Export

ParameterCLI optionTypeRequiredDescription
Connection--connArbitraryAddIn object with an open connection or port
Returns

Map Of KeyAndValue - Processing result

1C:Enterprise/OneScript code example
// Host
Port = 5555;
ServerObject = OPI_ZeroMQ.BindPortRep(Port);

If Not OPI_ZeroMQ.IsConnectorObject(ServerObject) Then
Raise OPI_Tools.JSONString(ServerObject);
EndIf;

If OPI_ZeroMQ.IsConnectorObject(ServerObject) Then
Result = OPI_ZeroMQ.CloseConnection(ServerObject);
EndIf;
Result
{
"result": true
}