1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-12-05 22:53:35 +02:00
Files
OpenIntegrations/docs/en/examples/TCP/SendBinaryData.txt

14 lines
510 B
Plaintext
Raw Normal View History

2025-10-20 19:41:52 +03:00
 Address = FunctionParameters["TCP_Address"];
2024-12-16 15:44:01 +03:00
Connection = OPI_TCP.CreateConnection(Address);
Message = "Hello server!" + Chars.LF;
2025-07-30 09:26:24 +03:00
Data = GetBinaryDataFromString(Message);
2024-12-16 15:44:01 +03:00
2024-12-17 14:53:37 +03:00
Result = OPI_TCP.SendBinaryData(Connection, Data);
2024-12-16 15:44:01 +03:00
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// End of message marker to avoid waiting for the end of timeout
Marker = Chars.LF;
2024-12-17 14:53:37 +03:00
Response = OPI_TCP.ReadBinaryData(Connection, , Marker);
2024-12-16 15:44:01 +03:00
OPI_TCP.CloseConnection(Connection);