The CLOSE macro shuts down the socket and frees the resources that are allocated to the socket. Issue the SHUTDOWN macro before you issue the CLOSE macro.
CLOSE can also be issued by a concurrent server after it gives a socket to a subtask program. After issuing GIVESOCKET and receiving notification that the client child has successfully issued TAKESOCKET, the concurrent server issues the CLOSE macro to complete the transfer of ownership.
Authorization: | Supervisor state or problem state, any PSW key. |
Dispatchable unit mode: | Task. |
Cross memory mode: | PASN = HASN. |
Amode: | 31-bit or 24-bit. Note: See "Addressability
mode (Amode) considerations" under CALL instruction API environmental restrictions and programming requirements.
|
ASC mode: | Primary address space control (ASC) mode. |
Interrupt status: | Enabled for interrupts. |
Locks: | Unlocked. |
Control parameters: | All parameters must be addressable by the caller and in the primary address space. |
>>-EZASMI--TYPE=CLOSE--,S--=--+-number---+----------------------> +-address--+ +-*indaddr-+ '-(reg)----' >--,ERRNO--=--+-address--+--,RETCODE--=--+-address--+-----------> +-*indaddr-+ +-*indaddr-+ '-(reg)----' '-(reg)----' >--+---------------------------+--+-------------------------+---> +-,ECB--=--+-address--+-----+ '-,ERROR--=--+-address--+-' | +-*indaddr-+ | +-*indaddr-+ | '-(reg)----' | '-(reg)----' '-,REQAREA--=--+-address--+-' +-*indaddr-+ '-(reg)----' >--+------------------------+---------------------------------->< '-,TASK--=--+-address--+-' +-*indaddr-+ '-(reg)----'
See Socket call error return codes for information about ERRNO return codes.