OPENHOST: Difference between revisions

From QB64 Phoenix Edition Wiki
Jump to navigation Jump to search
No edit summary
Tag: Reverted
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 12: Line 12:
* Valid {{Parameter|hostHandle}} values are negative numbers.
* Valid {{Parameter|hostHandle}} values are negative numbers.
* If the syntax is correct but they fail to begin/connect a {{Parameter|hostHandle}} of 0 is returned.
* If the syntax is correct but they fail to begin/connect a {{Parameter|hostHandle}} of 0 is returned.
* Always check if the handle returned is 0 (failed) before continuing.
* Always check if the handle returned is 0 (failed) before continuing.
* [[CLOSE]] {{Parameter|hostHandle}} closes the host. A failed handle value of 0 does not need to be closed.
* [[CLOSE]] {{Parameter|hostHandle}} closes the host. A failed handle value of 0 does not need to be closed.




Line 20: Line 19:
* [[_OPENCONNECTION]], [[_OPENCLIENT]]
* [[_OPENCONNECTION]], [[_OPENCLIENT]]
* [[_CONNECTED]], [[_CONNECTIONADDRESS]]
* [[_CONNECTED]], [[_CONNECTIONADDRESS]]
* [[Email Demo]], [[Inter-Program Data Sharing Demo]]  
* [[Email Demo]], [[Inter-Program Data Sharing Demo]]
* [[Downloading Files]]
* [[Downloading Files]]




{{PageNavigation}}
{{PageNavigation}}
[[Category:Latest]]

Latest revision as of 00:51, 29 January 2023

The _OPENHOST function opens a Host which listens for new connections and returns a Host status handle.


Syntax

hostHandle = _OPENHOST("TCP/IP:8080")


Description

  • Creates an Illegal Function Call error if called with a string argument of the wrong syntax.
  • The port used in the syntax example is 8080.
  • Valid hostHandle values are negative numbers.
  • If the syntax is correct but they fail to begin/connect a hostHandle of 0 is returned.
  • Always check if the handle returned is 0 (failed) before continuing.
  • CLOSE hostHandle closes the host. A failed handle value of 0 does not need to be closed.


See also



Navigation:
Main Page with Articles and Tutorials
Keyword Reference - Alphabetical
Keyword Reference - By usage
Report a broken link