TCP Listener Status

A TCP Listener Status event trigger executes when a TCP Listener device's status changes.

Defining a TCP Listener Status event trigger

To define a TCP Listener Status event trigger, follow these steps:

  1. From the Workbench left pane, expand the node where you want to define the TCP Listener Status event trigger.
  2. Select the Project icon to display the Projects window, right-click a specific project tab to display its pop-up menu, and then select New.
    You also can select the New button at the bottom of the Projects window when a specific project tab has already been selected.
  3. The new Trigger window appears.
    Name the trigger. The trigger name can be up to 64 characters and include letters, numbers, and the underscore character. Spaces are allowed.
  4. From the Event tab, select the Trigger Event Type down-arrow, expand the Networking category, and then select TCP Listener Status.
     
    The Event tab becomes active with parameters that accommodate the TCP Listener Status event.
Parameter Description
Device Name
The TCP Listener device that supports the TCP connection that receives TCP messages from partner applications.
Fire when a connection is established Select True or False.

Fire the event when a connection to the selected TCP Listener device is established.

Fire when a connection is lost Select True or False.

Fire the event when a connection to the selected TCP Listener device is lost.

Fire when a connection is rejected Select True or False.

Fire the event when a connection to the selected TCP Listener device is rejected.

TCP Listener Status event type trigger event variables

The input event variables available to a TCP Listener Status event trigger are:

Event variable Data type Description
Device Name STRING The name of the TCP Listener device.
Source Address STRING The IP Address and port that the data was received from.
State STRING

The status of the connection that fired the trigger.
The values are:

  • Established
  • Lost
  • Rejected
Reason Code INT4 The error code or status associated with the Reason String.
Reason String STRING The reason the connection was lost, established or rejected.

TCP Listener Status event trigger considerations

  • The selected TCP Listener device must be Started for the TCP Listener Status event trigger to be executed.
Related topics

Receive TCP Message

TCP Listener