SOCK gate, RECEIVE function
The RECEIVE function receives a buffer of data from a TCP/IP connected client.
Input Parameters
- CALLBACK_GATE
- Optional Parameter
- The gate at which the domain that requested the function will be notified when the request is complete.
- IP_ADDRESS
- Optional Parameter
- The binary IP address of the target.
- STRING_IP_ADDRESS
- Optional Parameter
- The IP address of the target, expressed as a string.
- MINIMUM_DATA_LENGTH
- Optional Parameter
- The minimum amount of data that must be received before the request is considered to be complete.
- PEEK
- Optional Parameter
- A binary parameter that indicates whether the read request should look at data without removing it from the socket's receive buffer.
- Values for the parameter are:
- NO
- YES
- PEEK_BUFFER
- Optional Parameter
- The buffer in which peek data is returned when PEEK(YES) is specified.
- Values for the parameter are:
- NO
- YES
- PORT
- Optional Parameter
- The binary port number of the target.
- RECEIVE_BUFFER
- The buffer that receives the data.
- RECEIVE_TYPE
- Optional Parameter
- A parameter that specifies whether a receive request is asynchronous or synchronous.
- Values for the parameter are:
- ASYNC
- SYNC
- SOCKET_TOKEN
- A token that is generated when a socket is created, and is used subsequently to identify the socket.
- STRING_IP_ADDRESS
- Optional Parameter
- The IP address of the target, expressed as a string.
- STRING_PORT
- Optional Parameter
- The port number of the target, expressed as a string.
- TIMEOUT
- Optional Parameter
Specifies how the timeout interval is determined. If the parameter is not specified,
or if TIMEOUT(SOCKETCLOSE) is specified, the timeout is taken from the TCPIPSERVICE definition. If
TIMEOUT(SCLOSELIM) is specified, the timeout is the lower value between the TCPIPSERVICE
SOCKETCLOSE value and 30 seconds. If TIMEOUT(DEFAULT) is specified, the timeout
is 30 seconds.
- Values for the parameter are:
- DEFAULT
SCLOSELIM
- SOCKETCLOSE
- TIMEOUT_VALUE
- Optional Parameter
- The interval after which a request will time out.
- USER_TOKEN
- Optional Parameter
- A token that the caller supplies to identify the request. The token is returned to the user at the callback gate when the request is complete.
Output Parameters
- SSL
- Optional output parameter SSL added:
- A binary parameter that specifies whether the socket that received the data is an SSL socket.
- Values of the parameter are:
- YES
- NO
- REASON
- The following values are returned when RESPONSE is DISASTER:
- ABEND
- LOCK_FAILURE
- LOOP
- SOCKET_IN_USE
- The following values are returned when RESPONSE is EXCEPTION:
- ADDRESS_IN_USE
- ADDRESS_NOT_AVAILABLE
- ALREADY_ASSOCIATED
- CLIENT_ERROR
- CONNECTION_CLOSED
- CONNECTION_REFUSED
- INSUFFICIENT_STORAGE
- INSUFFICIENT_THREADS
- INVALID_OPTION
- IO_ERROR
- MISSING_OPTION
- NEVER_ASSOCIATED
- NO_CONNECTION
- NO_SOCKET_AVAILABLE
- NOT_AUTHORIZED
- NOT_PENDING
- NOTIFICATION_UNAVAILABLE
- NOTIFIED
- SCHEDULED
- SSL_HANDSHAKE_ERROR
- STATE_ERROR
- TCP_NOT_ACTIVE
- UNKNOWN_SESSION_TOKEN
- The following values are returned when RESPONSE is INVALID:
- INVALID_FORMAT
- INVALID_FUNCTION
- The following values are returned when RESPONSE is PURGED:
- TASK_CANCELLED
- TIMED_OUT
- RESPONSE
- Indicates whether the domain call was successful. For more information, see RESPONSE parameter on domain interfaces.