Stream Settings
stream.auto_close
Abbreviation
st a
Access
get/set
Description
This setting is intended for all network related streams:
- tcp/udp clients
- tcp server clients
- http_get/http_post
When stream.auto_close
is false
, a stream remains open until the stream_close command is sent. Use the stream_poll command to determine status. A stream status of 2
indicates that the stream connection has been closed remotely. In this case, read any remaining RX data in the stream and issue stream_close.
When stream.auto_close
is true
, a stream handle is automatically reused when closed remotely.
Note: When stream.auto_close
is true
, TCP/HTTP/WebSocket client/server streams remain open until all RX data has been read, even if the remote side has closed the connection.
Arguments
<1|true|on/0|false|off>
where
0
orfalse
oroff
: auto close disabled1
ortrue
oron
: auto close enabled
Default
0
Properties
- takes effect immediately
Get example
> get st a
0
>
Set example
> set st a true
Set OK