XenoGuard Documentation

TCP Client Receive

Actions » Windows » Network » TCP » TCP Client Receive 

The action TCP Client Receive accepts data from a connected TCP server. Clients are able to receive strings or files sent by the TCP server.


[-] 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 action.

Parameters:

The action 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 action 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: