Complete send
Sends a signal to finish sending data to the specified connection
Function CompleteSend(Val ServerObject, Val ConnectionID) Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| ServerObject | - | Arbitrary | ✔ | Object of running server component |
| ConnectionID | - | String | ✔ | Connection identifier |
Returns: Map Of KeyAndValue - Execution result
caution
NOCLI: this method is not available in CLI version
1C:Enterprise/OneScript code example
LaunchPort = 9877;
ServerObject = OPI_TCP.StartServer(LaunchPort);
// Connect to running server
ConnectionAddress = "127.0.0.1:9877";
ClientObject = OPI_TCP.CreateConnection(ConnectionAddress);
If Not OPI_TCP.IsClientObject(ClientObject) Then
Raise OPI_Tools.JSONString(ClientObject);
EndIf;
ActiveConnections = OPI_TCP.GetConnectionList(ServerObject);
ConnectionID = ActiveConnections["connections"][0]["connectionId"];
// Finish sending from server
Result = OPI_TCP.CompleteSend(ServerObject, ConnectionID);
Result
{
"result": true
}