Skip to main content

TCP (Server)

The TCP (Server) output in ArcGIS Velocity hosts a TCP socket and sends events to connected clients, formatted as JSON, GeoJSON, Esri JSON, or delimited text.

Example

The following is an example use case for the output:

A dispatch center uses a TCP (Server) output to push vehicle alerts to in-vehicle display apps. Each display app connects to the reachable address and configured port provided by Velocity. Once connected, it receives alerts as JSON while the analytic is running.

Usage notes

Note the following when working with the output:

  • Clients connect to the reachable address and configured port provided by Velocity while the analytic is running. Ensure that your network or firewall permits incoming TCP connections on this port.

  • Velocity writes JSON, GeoJSON, and Esri JSON events consecutively without newline separators. Clients must use a streaming JSON parser that can process partial messages or multiple messages in a single read. TCP read boundaries do not define individual events.

  • Delimited text uses its configured message delimiter, which defaults to \n.

Parameters

The following table describes the parameters for the output:

Parameter

Description

Data type

Port (Required)

The local port on which Velocity listens for incoming TCP client connections. Specify an available port from 1 through 65535.

Integer

Hostname

The deployment-provided public hostname that clients use to connect to Velocity. This value is not editable and does not configure the local address on which the TCP server listens.

String

Considerations and limitations

Consider the following when using the output:

  • If you specify a port that is already in use or outside the valid range, Velocity reports an error because it cannot bind to the local port. A successful check does not reserve the port. The port must remain available when the analytic starts.

  • Velocity sends events only to clients connected at the time the events are produced. It does not replay events that a client misses while disconnected.

  • Velocity disconnects slow clients when their queues fill and rejects additional connections once it reaches the concurrent-client limit. Clients must handle reconnection.