Previous Topic: Assembler Structure DescriptionNext Topic: Comparing IDMSOCKI and SOCKET


The CA ADS Socket Interface

Applications written in CA ADS can use one of two methods to exploit TCP/IP sockets:

For both methods, the first four parameters are identical except that if linking to IDMSOCKI, each parameter must be defined as a record whose first element is a field described in the following table. If using the SOCKET built-in function the parameters can be records or record elements.

Parameter

Description

function

Specifies a 4-byte, fullword-aligned integer field that the program sets to the desired socket function. A detailed description of the supported functions can be found in Function Descriptions.

return-code

Specifies a 4-byte, fullword-aligned integer field that receives the outcome of the operation. The following are the returned values:

  • 0—No errors occurred.
  • 20—A parameter list error was encountered.
  • -1—A socket error was encountered; the errno and reason-code fields contain more detailed information about the error.

errno

Specifies a 4-byte, fullword-aligned integer field that receives the ERRNO value when return-code is -1. For more information, see Return, Errno, and Reason Codes.

reason-code

Specifies a 4-byte, fullword-aligned integer field that receives the reason code value when return-code is -1. For more information, see Return, Errno, and Reason Codes.

Depending on the function, zero or more parameters can follow.