Connect to the Spire Sense TCP Server

An authorization token is all you need to access the TCP feed. The additional access steps are available in the Developer Documentation under TCP Feed: Initiate Connection.

Once your connection has been established, AIS messages should begin streaming into your client. Note: It can take up to 60 seconds for the TCP server to start up a new stream after sending your token. 

Recommended Reconnection Strategy

The TCP server should keep your connection alive indefinitely and send keep-alives every 15 minutes to your client, however, exceptions still happen. Occasionally there might still be instances of unexpected disconnects to the TCP feed. In these cases, you can simply reconnect, re-authenticate with your token and the data stream will resume.

In order to minimize loss of data and impact on latency, we recommend setting up a reconnection method that automatically acts within two hours of an unexpected disconnect.

Did this answer your question?