|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > Internet and Network > HTP. - Command > !HTP-General - General HTTP operations and utilities > !Configuration - Commands for setting up HTTP environment (timeouts, headers, proxy) > HTP. - HTTP Operations |
SPR Script Language
HTP.SetSndTO
Sets the send timeout for HTTP operations in milliseconds.
Intention
The HTP.SetSndTO command in SPR configures the timeout for sending data in HTTP operations, such as those performed by HTP.Request or HTP.ReqShort. You specify the timeout in milliseconds ($$MS), or omit it to reset to the default send timeout. This controls how long your script waits to transmit data to a server before timing out.
It’s your robot’s send speed limiter—HTP.SetSndTO sets how long it waits to push data out to the web.
Illustration
⏱️ Set Send Timeout: HTP.SetSndTO|6000 sets a 6-second send timeout.
🔄 Reset: HTP.SetSndTO restores the default send timeout.
Syntax
HTP.SetSndTO|$$MS
Parameter Explanation
P1 - $$MS - (Variable, Numeric, Optional)
The send timeout in milliseconds (e.g., $$MS as "6000"). If omitted, resets to the default stored in g_send.
Examples
'***********************************
' HTP.SetSndTO - Sample 1: Set 6-Second Send Timeout
'***********************************
HTP.SetSndTO|6000
MBX.Send timeout set to 6 seconds
HTP.Request|POST|https://example.com|$$DATA||0|0|$$RES
MBX.Ready
'
'***********************************
' HTP.SetSndTO - Sample 2: Reset to Default
'***********************************
HTP.SetSndTO
PRT.Send timeout reset to default
MBX.Ready
'
Remarks
- Sets the send timeout for subsequent HTTP operations.
- Omitting $$MS resets to the default stored in g_send.
- Affects the data transmission phase of HTTP requests.
Limitations
- No success confirmation; assumes HTP_SetSendTimeout succeeds.
- Default value depends on initial g_send setting.
See also: