Important: The information in this document is obsolete and should not be used for new development.
PCloseSkt
ThePCloseSkt
function 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
TRUE
for asynchronous execution.
--> ioCompletion ProcPtr A completion routine. <-- ioResult OSErr The result code. --> csCode Integer Always closeSkt
for 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 thePCloseSkt
function to close a socket that you opened with thePOpenSkt
function. ThePCloseSkt
function returns a result code ofddpSktErr
if you specify a socket number of 0 or if there is no open socket with the socket number you specify.The
PCloseSkt
function is equivalent to calling thePBControl
function with a value ofcloseSkt
in thecsCode
field of the parameter block.ASSEMBLY-LANGUAGE INFORMATION
To execute thePCloseSkt
function from assembly language, call the_Control
trap macro with a value ofcloseSkt
in thecsCode
field of the parameter block. You must also specify the .MPP driver reference number. To execute the_Control
trap asynchronously, include the value,ASYNC
in 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.