CRecordTcpCreateClient
This nano service (im Namespace SYSTEM) is run by the TCP plugin and creates a TCP client that can then be used for messaging. There is an automatic link with the layer above (plugin NY_Network).
{ "id": "82c787b3-4541-4928-bff4-5862291a837e", "name": "TCP_CREATE_CLIENT", "isService": "true", "hasOtherSlots": "false", "description": "Create and start a TCP client.", "namespaces": "SYSTEM", "slots": [ { "key": "1", "name": "ID ", "answer": "false", "mandatory": "true", "type": "UUID", "description": "The connection ID (useful for tracking)." }, { "key": "2", "name": "HOST", "answer": "false", "mandatory": "true", "type": "STRING", "description": "The address (IP or Host) to connect." }, { "key": "3", "name": "PORT", "answer": "false", "mandatory": "true", "type": "INT", "description": "The port of the TCP connection." }, { "key": "4", "name": "TLS_ENABLED", "answer": "false", "mandatory": "false", "type": "BOOLEAN", "description": "True if this is a TLS socket." }, { "key": "5", "name": "TLS_PROTOCOLS", "answer": false, "mandatory": false, "type": "STRING", "description": "The TLS protocol. Default: TLSv1.3" }, { "key": "6", "name": "TLS_CIPHER_SUITES", "answer": false, "mandatory": false, "type": "STRING", "description": "The TLS cipher suite. Default: TLS_AES_128_GCM_SHA256" }, { "key": "7", "name": "INPUT_BUFFER_SIZE", "answer": "false", "mandatory": "false", "type": "INT", "description": "The input buffer size. Default: 270000" }, { "key": "8", "name": "RETRY_TIMEOUT ", "answer": "false", "mandatory": "true", "type": "LONG", "description": "The retry timeout.\nIf the connection could not be established, a retry will be performed after this time in milliseconds.\nA timeout of 0 means no retry." }, { "key": "9", "name": "FAIL_ON_FIRST_CONNECT ", "answer": "false", "mandatory": "false", "type": "BOOLEAN", "description": "Default: false.\nFail if the first connection attempt couldn't be established.\nFurther connection attempts after an interruption of the connection are not affected by this, see argument RETRY_TIMEOUT." }, { "key": "10", "name": "WANT_UPDATE_ON_RETRY ", "answer": "false", "mandatory": "false", "type": "BOOLEAN", "description": "Default: false.\nWant an update message on the beginning of each retry waiting period.\nSee TCP_CREATE_CLIENT_RETRY" } ] }
In addition to the host and port, an
The other specifications are optional.
Retry timeout
For clients, you can specify a
Fail on first connect
If
Want update on retry
If
TLS
To create an encrypted connection using TLS, see here: Requirement for a TLS connection.