qtoq_close()--Close QoS Sockets Connection API
Syntax
#include <qtoqsapi.h> int qtoq_close( int socket_descriptor, int *qos_descriptor, unsigned int *qos_session, )Service Program Name: QSYS/QTOQSAPI
Default Public Authority: *EXCLUDE
Threadsafe: Yes
qtoq_close() is called to close the socket and QoS session that was created using the other qtoq_ sockets-type APIs. It performs a standard sockets close(); on the socket descriptor, close the QoS session for this connection and inform the QoS server that the connection should be closed and the rule unloaded.
Parameters
- socket_descriptor
- (Input) Required
The socket descriptor that was created to perform the TCP/IP communications for this connection.
- qos_descriptor
- (Input) Optional
Pointer to an integer for the value of the descriptor that the application used to wait on QoS events.
- qos_session
- (Input) Required
Pointer to an integer containing the QoS session ID that was returned when the QoS connection was established.
Authorities
None.
Return Values
0 | if successful. |
-1 | if function failed. Errno indicates error reason. |
Error Conditions
When this function call fails, the errno value is set to one of the following:
- [EBADF]
Descriptor not valid.
- [EIO]
Input/output error.
- [ENOBUFS]
There is not enough buffer space for the requested operation.
- [EUNKNOWN]
Unknown system state.
Error Messages
Message ID | Error Message Text |
---|---|
CPE3418 E | Possible APAR condition or hardware failure. |
CPF9872 E | Program or service program &1 in library &2 ended. Reason code &3. |
CPFA081 E | Unable to set return value or error code. |
Usage Notes
- The qtoq_close() API must be used in place of the normal close() sockets call in an application using the QTOQ APIs. If it is not used, the results are unpredictable.
Related Information
For a description of the RSVP protocol, see RFC 2205 on the RFC Pages.
API introduced: V5R2