_OPENHOST

From QB64 Wiki
Revision as of 00:46, 20 April 2020 by Odin (talk | contribs)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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:
Keyword Reference - Alphabetical
Keyword Reference - By usage
Main WIKI Page