1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-03 01:51:20 +00:00
QB64-PE/internal/help/_CONNECTED.txt

27 lines
992 B
Plaintext
Raw Normal View History

2016-03-18 11:36:04 +00:00
{{DISPLAYTITLE:_CONNECTED}}
The [[_CONNECTED]] function returns the status of a TCP/IP connection handle.
{{PageSyntax}}
2017-10-10 14:55:21 +00:00
:{{Parameter|result&}} = [[_CONNECTED]]({{Parameter|connectionHandle&}})
{{PageDescription}}
2017-10-10 14:55:21 +00:00
* The handle can come from the [[_OPENHOST]], [[OPENCLIENT]] or [[_OPENCONNECTION]] QB64 TCP/IP functions.
* Returns -1 if still connected or 0 if connection has ended/failed.
2017-10-10 14:55:21 +00:00
* Do not rely solely on this function to check for ending communication.
2019-04-15 01:15:33 +00:00
* Use "time-out" checking as well and [[CLOSE]] any suspect connections.
2021-01-04 18:45:32 +00:00
* If this function indicates the handle is not connected, any unread messages can still be read using [[GET (TCP/IP statement)|GET #]].
2017-10-10 14:55:21 +00:00
* Even if this function indicates the handle is not connected, it is important to [[CLOSE]] the connection anyway or important resources cannot be reallocated.
{{PageSeeAlso}}
2017-10-10 14:55:21 +00:00
* [[_OPENCONNECTION]]
* [[_OPENHOST]]
* [[_OPENCLIENT]]
* [[_CONNECTIONADDRESS$]]
* [[Downloading Files]]
2019-04-15 01:15:33 +00:00
{{PageNavigation}}
<