The TCP (Client) output in ArcGIS Velocity sends events formatted as delimited text and JSON to a TCP server using a TCP socket connection. You can find this output listed under the Web and Messaging options.
Example
Ниже приводится пример использования выходных данных:
A weather monitoring system streams real-time temperature and humidity data from remote sensors. The data is sent in delimited text format through the TCP (Client) output to a cloud-based dashboard server for real-time visualization. Each sensor station connects using its own port to keep the data organized.
Usage notes
При работе с выходными данными нужно учитывать следующее:
- Velocity поддерживает несколько форматов выходных данных. К ним относятся JSON, GeoJSON, EsriJSON и разделённый текст.
- При выборе формата текста разделителями необходимо указать разделитель, который будет помещаться между значениями атрибутов. Наиболее распространёнными разделителями являются запятая, символ вертикальной черты или точка с запятой.
- The Host parameter supports hostname or IP address, including elastic IP address commonly used in cloud environments.
- It is recommended that different feeds of event data use their own TCP (Client) output configurations and ports.
Parameters
Ниже приведены параметры выходных данных:
| Parameter | Description | Data type |
|---|---|---|
| Host (Обязательный) | The host name or the IP address of the TCP server to establish a socket connection. The default is localhost. The host value can also be 1.1.1.1 or example.com. | Строка |
| Port (Обязательный) | The TCP port number on which the server is listening to incoming connections—for example, 5005. | Integer |
| Connection Timeout (Дополнительный) | Specifies how long, in seconds, the client waits while trying to establish a connection to the TCP server. If the connection cannot be established in the specified amount of time, the output reports an error. The default is 60 seconds. | Integer |
| Output data format (Обязательный) | Specifies the data format type of your output. Options are GeoJSON, EsriJSON, Delimited, and JSON. | Output data format type |
Considerations and limitations
При использовании выходных данных учитывайте следующее:
- If you provide invalid information for the Host or Port parameter, Velocity throws an error because it cannot establish connection to the specified host name and port.
- A TCP connection may be abruptly terminated by the TCP server when, for example, server resources have been depleted, or the server thinks that the client is no longer reachable because it has not responded to a control message. Once the client-server connection is closed, neither entity can communicate status with the other. This means an active TCP (Client) output may not be able to automatically reconnect. It is recommended that you manually stop and restart the Velocity output to restore connection to the TCP server in this case.