Process request
Sends a request and waits for a response within the specified time (for the REQ/REP scheme)
- Parameters
- Advanced call ?
Function ProcessRequest(Val Connection, Val Data, Val SendingTimeout = Undefined, Val ReceivingTimeout = Undefined) Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| Connection | --conn | Arbitrary | ✔ | AddIn object with open connection |
| Data | --data | BinaryData | ✔ | Sending data |
| SendingTimeout | --treq | Number, Undefined | ✖ | Sending timeout (in ms). No timeout if undefined |
| ReceivingTimeout | --trep | Number, Undefined | ✖ | Receiving timeout (in ms). No timeout if undefined |
Returns
Map Of KeyAndValue - Processing result
| Parameter | Description |
|---|---|
| dontwait | Creates a background job and returns its data (for 1C and OneScript only) |
tip
Parameters with Binary data type can also accept file paths on disk and URLs
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;
// Client
Address = "tcp://127.0.0.1:5555";
ClientObject = OPI_ZeroMQ.CreateConnectionReq(Address);
If Not OPI_ZeroMQ.IsConnectorObject(ClientObject) Then
Raise OPI_Tools.JSONString(ClientObject);
EndIf;