Datacenter supports datasets of type Socket Listener, allowing user to stream data into Datacenter via UDP or TCP. This provider effectively create a server that listens for incoming data.

This is particularly useful for scenarios when a user needs to stream frequently updating data to the Datacenter.

Follow these steps to configure a Socket dataset:

  1. Create a new dataset of type Socket Listener, specifying a name and (optionally) a prefix to use to identify the dataset and its values:

    image-20240808-134557.png
  2. Click Add. The dataset is added to the list, and it has an initial OK status as its default protocol is UDP, for which is impossible to establish whether a connection to the socket has been made. However, in case another existing dataset is using the same default port (6000), then the newly added dataset is in an initial ERROR state.

    image-20240808-134701.png
  3. You can now configure the dataset in the Dataset parameters section panel by double clicking a row. Here you can specify a Protocol and a Port to start receiving data.

    image-20241004-092620.png
  4. Depending on the protocol selected, the dataset can be in one of the following states:

    1. UDP

      1. OK: The specified port can be bound and (optionally) Datacenter receives data on it.

      2. Error: The specified port cannot be bound (already in use), a socket error happened or Datacenter is receiving malformed data.

    2. TCP

      1. OK: The specified port can be bound, a connection to it is established and (optionally) Datacenter receives data on it.

      2. Warning: Awaiting incoming connection.

      3. Error: A connection/socket error happened or Datacenter is receiving malformed data.

  5. Given that the dataset is in an OK state, as soon as Datacenter receives data, the corresponding entries are added to the Dataset Entries table.

Please refer to the Filtering and Manipulating a Dataset Entries page to learn how to enable, disable and edit the entries added.

Note: a Socket Listener provider expects the data formatted as a valid JSON.

Note: a Socket Connector provider, when using the TCP protocol, expects the data payload to terminate with a new line (i.e., ā€˜\nā€™) separator character.