Close connection
Close previously created connection
- Parameters
- Advanced call ?
Function CloseConnection(Val Connection) Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| Connection | - | Arbitrary | ✔ | AddIn object with an open connection or port |
Returns
Map Of KeyAndValue - Processing result
This method has no additional advanced call parameters.
Caution
NOCLI: this method is not available in CLI version
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
}