1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-01 15:00:38 +00:00
QB64-PE/internal/help/_OPENCONNECTION.txt

26 lines
1.1 KiB
Plaintext
Raw Normal View History

2016-03-18 11:36:04 +00:00
{{DISPLAYTITLE:_OPENCONNECTION}}
2017-10-10 14:55:21 +00:00
The [[_OPENCONNECTION]] function opens a connection from a client that the host has detected and returns a status handle.
{{PageSyntax}}
2017-10-10 14:55:21 +00:00
:{{Parameter|connectHandle}} = [[_OPENCONNECTION]]({{Parameter|hostHandle}})
{{PageDescription}}
2017-10-10 14:55:21 +00:00
* Valid {{Parameter|connectHandle}} values returned are negative numbers.
* If the syntax is correct but they fail to begin/connect, a {{Parameter|connectHandle}} of 0 is returned.
* Always check if the handle returned is 0 (failed) before continuing.
2017-10-10 14:55:21 +00:00
* [[CLOSE]] #{{Parameter|connectHandle}} closes the connection. Failed connections({{Parameter|connectHandle}} = 0) do not need to be closed.
* As a '''Host''' you can check for new clients (users). Each will have a unique connection handle.
* Creates an [[ERROR Codes|Illegal Function Call]] error if called with a string argument of the wrong syntax.
2021-01-04 18:45:32 +00:00
* Handle values can be used as the open number by [[GET (TCP/IP statement)|GET #]] read statement and [[PUT (TCP/IP statement)|PUT #]] write statement.
{{PageSeeAlso}}
2016-03-18 11:36:04 +00:00
* [[_OPENHOST]], [[_OPENCLIENT]]
* [[_CONNECTED]], [[_CONNECTIONADDRESS]]
2019-04-15 01:15:33 +00:00
{{PageNavigation}}
<