CRecordTcpCreateServer
This nano service (im Namespace SYSTEM) is run by the TCP plugin and creates a TCP server that can then be used for messaging. There is an automatic link with the layer above (plugin NY_Network).
{
"id": "27bde5b0-962d-4cc7-8c70-b5e093e91b90",
"name": "TCP_CREATE_SERVER",
"isNanoService": "true",
"type": "REQUEST",
"hasOtherSlots": "false",
"description": "Create and start a TCP server.",
"namespaces": "SYSTEM",
"slots": [
{
"key": "1",
"name": "ID",
"direction": "REQUEST",
"presenceConstraint": "MANDATORY",
"type": "UUID",
"description": "The ID of the TCP server."
},
{
"key": "2",
"name": "PORT",
"direction": "REQUEST",
"presenceConstraint": "MANDATORY",
"type": "INT",
"description": "The port of the TCP server."
},
{
"key": "3",
"name": "TLS_ENABLED",
"direction": "REQUEST",
"presenceConstraint": "OPTIONAL",
"type": "BOOLEAN",
"description": "True if this is a TLS socket."
},
{
"key": "4",
"name": "TLS_PROTOCOLS",
"direction": "REQUEST",
"presenceConstraint": "OPTIONAL",
"type": "STRING",
"description": "The TLS protocol. Default: TLSv1.3"
},
{
"key": "5",
"name": "TLS_CIPHER_SUITES",
"direction": "REQUEST",
"presenceConstraint": "OPTIONAL",
"type": "STRING",
"description": "The TLS cipher suite. Default: TLS_AES_128_GCM_SHA256"
},
{
"key": "6",
"name": "INPUT_BUFFER_SIZE",
"direction": "REQUEST",
"presenceConstraint": "OPTIONAL",
"type": "INT",
"description": "The input buffer size. Default: 270000"
}
]
}
Slot Description
| Key | Name | Direction | Presence Constraint | Type | Description |
|---|---|---|---|---|---|
| 1 | ID | REQUEST | MANDATORY | UUID | The ID of the TCP server. |
| 2 | PORT | REQUEST | MANDATORY | INT | The port of the TCP server. |
| 3 | TLS_ENABLED | REQUEST | OPTIONAL | BOOLEAN | True if this is a TLS socket. |
| 4 | TLS_PROTOCOLS | REQUEST | OPTIONAL | STRING | The TLS protocol. Default: TLSv1.3 |
| 5 | TLS_CIPHER_SUITES | REQUEST | OPTIONAL | STRING | The TLS cipher suite. Default: TLS_AES_128_GCM_SHA256 |
| 6 | INPUT_BUFFER_SIZE | REQUEST | OPTIONAL | INT | The input buffer size. Default: 270000 |
Usage
In addition to the port, an ID must be specified. This is an arbitrary UUID and is only used to reference this server.
The port must also be specified. The remaining details are optional.
To create an encrypted connection using TLS, see here: Requirement for a TLS connection.
Record Usage
In
One or more descriptions of these Records are stored in the JSON or XML format
as record.json or record.xml within a directory.
The Record Generator, an included Swing tool, generates helper classes from these files.
These classes can then be used to type-safely write or read messages.