1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2026-05-04 20:54:02 +02:00
Files
OpenIntegrations/docs/en/examples/GRPC/ProcessBidirectionalStream.txt
T

36 lines
1.2 KiB
Plaintext
Vendored

Address = "https://grpcb.in:9001";
Proto1 = "https://hut.openintegrations.dev/test_data/grpcbin_with_import.proto"; // String, path to file or URL
Proto2 = "https://hut.openintegrations.dev/test_data/mt.proto"; // String, path to file or URL
Scheme = New Map;
Scheme.Insert("main.proto" , Proto1); // Primary
Scheme.Insert("my_types.proto", Proto2); // For import in primary
Parameters = OPI_GRPC.GetConnectionParameters(Address, Scheme);
Tls = OPI_GRPC.GetTlsSettings(True);
StingsArray = New Array;
StingsArray.Add("one");
StingsArray.Add("two");
StingsArray.Add("three");
Data = New Map;
Data.Insert("f_string" , "Test message");
Data.Insert("f_bool" , True);
Data.Insert("f_strings", StingsArray);
Data.Insert("f_sub" , New Structure("f_string", "Nested value"));
Service = "grpcbin.GRPCBin";
Method = "DummyBidirectionalStreamStream";
ExchangeOrder = New Array;
For N = 1 To 10 Do
ExchangeOrder.Add(Data); // Single send
ExchangeOrder.Add(Undefined); // Single get
EndDo;
Result = OPI_GRPC.ProcessBidirectionalStream(Parameters, Service, Method, ExchangeOrder, , Tls);