Important: The information in this document is obsolete and should not be used for new development.
PCloseSkt
ThePCloseSktfunction removes the entry for a specific socket from the socket table.
FUNCTION PCloseSkt (thePBptr: MPPPBPtr; async: Boolean): OSErr;
thePBptr- A pointer to an MPP parameter block.
async- A Boolean that specifies whether or not the function should be executed asynchronously. Specify
TRUEfor asynchronous execution.
--> ioCompletion ProcPtr A completion routine. <-- ioResult OSErr The result code. --> csCode Integer Always closeSktfor this function.--> socket Byte The number of the socket to close.
Field Description
socket- The number of the socket you wish to close. You cannot use 0 for this field.
DESCRIPTION
Use thePCloseSktfunction to close a socket that you opened with thePOpenSktfunction. ThePCloseSktfunction returns a result code ofddpSktErrif you specify a socket number of 0 or if there is no open socket with the socket number you specify.The
PCloseSktfunction is equivalent to calling thePBControlfunction with a value ofcloseSktin thecsCodefield of the parameter block.ASSEMBLY-LANGUAGE INFORMATION
To execute thePCloseSktfunction from assembly language, call the_Controltrap macro with a value ofcloseSktin thecsCodefield of the parameter block. You must also specify the .MPP driver reference number. To execute the_Controltrap asynchronously, include the value,ASYNCin the operand field.RESULT CODES
noErr 0 No error ddpSktErr -91 Bad socket number SEE ALSO
For information on the assignment of socket numbers, see "POpenSkt" beginning on page 7-38.