Lasso Soft Inc. > Home

[Net_ConnectInProgress]

[Net_ConnectInProgress] represents a return value from the [Net->Connect] tag. This value is returned when a connect is attempted, but the [Net] object already has an open connection.

  • Syntax
  • Parameters
<?LassoScript
Variable: 'Connection' = (Net);
If: $Net->(Connect: 'www.example.com', '80') == Net_ConnectInProgress;
Output: 'A connection is already in progress.';
/If;
?>
Examples

To connect to a remote server using TCP:

Use the [Net] type and its member tags to establish a TCP connection. The following example opens a blocking TCP connection to the Web server running on an example server and fetches the root document. The result will be an HTML page.

[Variable: 'myConnection' = (Net)]
[$myConnection->(SetBlocking: True)]
[$myConnection->(SetType: Net_TypeTCP)]
[Var: 'Result' = $myConnection->(Connect: 'www.example.com', 80)]
[Fail_If: $Result == Net_ConnectInProgress, (-1), 'TCP Error']
[Variable: 'Result' = $myConnection->(Write: 'GET /\r\n')]
[Variable: 'Output' = $myConnection->(Read: 32768)]
[$myConnection->(Close)]
[Output: $Output]
Result:
<html><head><title>HTML Document</title></head>>body> ...
Tag Link [Net_ConnectInProgress] Category Networking
Type Constant Data Source Any
Support Preferred Version 7.0
Output Type Integer Security None
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.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. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft