[TCP_Send] sends a string through a low-level TCP/IP connection to a remote server and returns the results.
This tag requires a -Name parameter which is the local name of a TCP/IP connection that was opened using a [TCP_Open] tag.
Any string values included in the tag are concatenated together and sent as a message to the remote server. The responses from each remote server are collected into a buffer and then returned from the [TCP_Send] tag.
If the -DontWait parameter is set to True then the tag will return no result. However, any response from the remote server will still be collected into the buffer and will be returned by the next [TCP_Send] tag that returns a result.
If the -StopAfter parameter is specified then the contents of the buffer for the current connection will be returned up until the specified value. This allows the incoming buffer to be parsed out in chunks. Note: [TCP_Send] can be called with a -StopAfter, but no string value to send, in order to simply receive data from the remote server.
The optional -TimeOut parameter specifies how many seconds Lasso should wait before giving up on a response from the remote server. After timing out any data from the server that is in the buffer will be returned.
[TCP_Send: -Name='Connection Name',
String Value]
[TCP_Send: -Name='Connection Name',
-DontWait=True,
String Value]
[TCP_Send: -Name='Connection Name',
-StopAfter='Stop Characters',
String Value]
[TCP_Send: -Name='Connection Name',
-StopAfter='Stop Characters']
[TCP_Send: -Name='Connection Name',
-TimeOut=TimeOut Seconds,
String Value]
Use the [TCP_Send] tag. The following example sends a GET request to a Web server through a connection named Example. All of the results of the GET are returned.
[TCP_Send: -Name='Example',
-TimeOut=30,
'GET / HTTP/1.0
']
<html>
<head>
<title> Example Web Page </title>
</head>
<body>
...
</body>
</html>
Tag Link | [TCP_Send] | Category | Technical |
---|---|---|---|
Type | Substitution | Data Source | Any |
Support | Preferred | Version | 5.0 |
Output Type | String | Security | Tag |
Implementation | Sets | Lasso 5.0 |
Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft