LassoScript Utility
Basics Browse Detail

[TCP_Open]

Tag Link [TCP_Open] Category Networking
Type Process Source Available No
Support Preferred Version 5.0
Change Unchanged Data Source Any
Output Type None Security Tag
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0

Description

[TCP_Open] opens a low-level TCP/IP connection to a remote server.

This tag requires a -Name parameter which is the local name of the TCP/IP connection that needs to be passed to subsequent [TCP_Send] and [TCP_Close] tags.

The required -Host parameter specifies the IP address or host name of the server to which a connection should be opened. The optional -Port parameter specifies the port on the remote server that should be opened (defaults to the HTTP standard of 80).

The optional -TimeOut parameter specifies how many seconds Lasso should wait before giving up on a response from the remote server.

Syntax

[TCP_Open: -Name='Connection Name',
-Host='Host Name']

[TCP_Open: -Name='Connection Name',
-Host='Host Name',
-Port=Port Number,
-TimeOut=TimeOut Seconds]

Parameters

Required Parameters
-Host The IP address or host name of the server to be contacted.
-Name The name of the TCP connection.
Optional Parameters
-Port The port to connect to.
-Timeout The number of seconds after which to time out the TCP connection.

Examples

To open a low-level TCP/IP connection to a remote server:

Use the [TCP_Open] tag. The following example opens a TCP/IP connection to the Web server named www.example.com with a timeout of 30 seconds.

[TCP_Open-Name='Example',
  -Host='www.example.com',
  -Port=80,
  -TimeOut=30]