XenoGuard 4.0 Documentation

TCP Server Receive

ActionStep Reference » Windows » Network » TCP » TCP Server Receive 

The TCP Server Receive ActionStep is designed to be called within a loop to efficiently accept data from connected TCP clients. It collects all data received since the last call, storing the results in a list that can be iterated over, thereby facilitating structured data retrieval and management.


[-] Hide
  1. Open the Windows node in the Workspace Explorer.
  2. Open the Network node.
  3. In the TCP node, select the TCP Server Receive ActionStep.

Parameters:

The ActionStep has the following input parameters:


name Description
Name
The name of the TCP server.

Allowed Context Scopes [Fixed, Local, Global]
Allowed Context Types [Variable, Parameter, Enum]

Results:

The ActionStep returns the following results:


name
description
Message Count
The number of received messages from clients.

Allowed Context Scope [Fixed]
Allowed Context Types [Variable, Parameter]
Messages
The data that was received from the connected TCP clients.

Parameter for the "Message" sub-branch:

  • Address - the IP address of the client
  • Client Port - the port number used by the client
  • Tag - the tag that identifies the received data
  • Data - the received data from the client
  • Valid - a boolean value that validates the data
  • Count - the number of messages received from the client
Allowed Context Scopes [Fixed, Local, Global]
Allowed Context Types [Variable, Parameter]

Example 1 (Accept message from a TCP client device):

This example creates two local variables, ServerName and ServerPassword, with Text as data type and values are used to start a TCP server. The server waits for 10 seconds before receiving the message sent by the TCP Client and replies a message back to the client. A notice of the message sent by the TCP client is displayed via Message Box.

See other TCP operations: