Close connection
Close previously created connection
- Parameters
- Advanced call ?
Function CloseConnection(Val Connection) Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| Connection | --conn | Arbitrary | ✔ | AddIn object with an open connection or port |
Returns
Map Of KeyAndValue - Processing result
| Parameter | Description |
|---|---|
| dontwait | Creates a background job and returns its data (for 1C and OneScript only) |
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
}