Skip to main content

Process request

Sends a request and waits for a response within the specified time (for the REQ/REP scheme)

Function ProcessRequest(Val Connection, Val Data, Val SendingTimeout = Undefined, Val ReceivingTimeout = Undefined) Export

ParameterCLI optionTypeRequiredDescription
Connection--connArbitraryAddIn object with open connection
Data--dataBinaryDataSending data
SendingTimeout--treqNumber, UndefinedSending timeout (in ms). No timeout if undefined
ReceivingTimeout--trepNumber, UndefinedReceiving timeout (in ms). No timeout if undefined
Returns

Map Of KeyAndValue - Processing result

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;