XenoGuard 4.0 Documentation

TCP Client Receive

ActionStep Reference » Windows » Network » TCP » TCP Client Receive 

The TCP Client Receive  ActionStep is designed to be called within a loop to efficiently accept data from a connected TCP server. 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 Client Receive ActionStep.

Parameters:

The ActionStep has the following input parameters:


name Description
Name
The name of the TCP client.

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

Results:

The ActionStep returns the following results:


name
description
String Count
The number of received string messages.

Allowed Context Scope [Fixed]
Allowed Context Types [Variable, Parameter]
File Count
The number of received files.

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

Parameter for the "String" sub-branch:

  • Address - the IP address of the server
  • Server Port - the port number of the server
  • Tag - the tag that identifies the received data
  • Data - the received data
Allowed Context Scopes [Fixed, Local, Global]
Allowed Context Types [Variable, Parameter]
Files
The number of received files.

Parameter for the "File" sub-branch:

  • Address - the IP address of the server
  • Server Port - the port number of the server
  • File Name - the file name of the source file
  • File Size - the size of the file 
  • Path Name - the path name of the received temporary file
Allowed Context Scopes [Fixed, Local, Global]
Allowed Context Types [Variable, Parameter]

Example 1 (Store a file received from the TCP server):

This example creates two local variables, ServerName and ServerPassword, with Text as data type. The started client sends a message to the server and waits for its response. If the server responds and the file count is greater or equal to 1, the file from the server is copied and saved in local storage specified in the created path. A notice then displays the location of the stored file in Message Box. Otherwise, the client continues to wait for the server's response.


See other TCP operations: