Accepts a connection from an
Open Tcp Server file number.
Syntax
Usage
clientfilenum = Tcp Accept( [#]serverfilenum )
Parameters
Return Value
Returns a new client file number on success, or zero (0) on failure.
Description
Tcp Accept waits for the next incoming connection on a TCP server file number. It chooses a free file number for the accepted client and returns it to the program. The returned file number should be closed with
Close when the connection is no longer needed.
The server file number remains open and may be passed to
Tcp Accept again to accept another connection.
Example
See examples/network/opentcp/http-server.bas and examples/network/opentcp/two-connections-selftest.bas.
Differences from QB
See also