You've already forked OpenIntegrations
mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-11-27 22:18:36 +02:00
50 lines
1.0 KiB
Plaintext
Vendored
50 lines
1.0 KiB
Plaintext
Vendored
---
|
|
sidebar_position: 1
|
|
---
|
|
|
|
import Tabs from '@theme/Tabs';
|
|
import TabItem from '@theme/TabItem';
|
|
|
|
# Create Connection
|
|
Creates a TCP connection
|
|
|
|
|
|
|
|
`Function CreateConnection(Val Address, Val Tls = "") Export`
|
|
|
|
| Parameter | CLI option | Type | Required | Description |
|
|
|-|-|-|-|-|
|
|
| Address | - | String | ✔ | Address and port |
|
|
| Tls | - | Structure Of KeyAndValue | ✖ | TLS settings, if necessary. See GetTlsSettings |
|
|
|
|
|
|
Returns: Map Of KeyAndValue, Arbitrary - Returns TCP client object on successful connection or error information
|
|
|
|
<br/>
|
|
|
|
|
|
:::caution
|
|
**NOCLI:** this method is not available in CLI version
|
|
:::
|
|
<br/>
|
|
|
|
|
|
|
|
```bsl title="1C:Enterprise/OneScript code example"
|
|
Address = "45.79.112.203:4242";
|
|
Connection = OPI_TCP.CreateConnection(Address);
|
|
|
|
OPI_TCP.CloseConnection(Connection);
|
|
|
|
Address = "tcpbin.com:4243";
|
|
Tls = OPI_TCP.GetTlsSettings(False);
|
|
Connection = OPI_TCP.CreateConnection(Address, TLS);
|
|
```
|
|
|
|
|
|
|
|
|
|
```json title="Result"
|
|
"AddIn.OPI_TCPClient.Main"
|
|
```
|