Difference between revisions of "FSOCKOPEN()"
From Recital Documentation Wiki
Yvonnemilne (Talk | contribs) |
Yvonnemilne (Talk | contribs) |
||
Line 1: | Line 1: | ||
{{YLM to do}} | {{YLM to do}} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
==Purpose== | ==Purpose== | ||
− | Function to open | + | Function to open a TCP/IP socket |
==Syntax== | ==Syntax== | ||
− | + | FSOCKOPEN(<expC>, <expN>) | |
Line 19: | Line 14: | ||
==Description== | ==Description== | ||
− | The | + | The FSOCKOPEN() function opens a TCP/IP socket. It returns a numeric pointer when the socket is opened successfully, or a -1 if unsuccessful. The <expC> is the address, <expN> is the port number. Since the pointer is required to identify an open socket to other functions, always assign the return value to a memory variable. |
− | + | The FCLOSE() function is used to close a socket which has been opened with FSOCKOPEN(). | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
==Example== | ==Example== | ||
<code lang="recital"> | <code lang="recital"> | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
</code> | </code> | ||
Line 63: | Line 29: | ||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
− | |||
− |
Revision as of 13:17, 1 December 2009
Purpose
Function to open a TCP/IP socket
Syntax
FSOCKOPEN(<expC>, <expN>)
See Also
FCLOSE(), FFLUSH(), FGETS(), FPUTS(), FREAD()
Description
The FSOCKOPEN() function opens a TCP/IP socket. It returns a numeric pointer when the socket is opened successfully, or a -1 if unsuccessful. The <expC> is the address, <expN> is the port number. Since the pointer is required to identify an open socket to other functions, always assign the return value to a memory variable.
The FCLOSE() function is used to close a socket which has been opened with FSOCKOPEN().
Example
Products
Recital, Recital Server