Difference between revisions of "Close"
Jump to navigation
Jump to search
(New page: '''close, sockclose (HLCALL 0x3E03)''' - close a socket == Synopsis == ''Assembly language'' ld a, (v_sockfd) ld hl, CLOSE call HLCALL ''C'' #include <sys/socket.h...) |
(No difference)
|
Latest revision as of 12:52, 16 August 2008
close, sockclose (HLCALL 0x3E03) - close a socket
Synopsis
Assembly language
ld a, (v_sockfd) ld hl, CLOSE call HLCALL
C
#include <sys/socket.h> int sockclose(int sockfd);
Description
The close/sockclose function closes a socket. In the C library, the function call is defined as sockclose, since the Z88DK fcntl is not yet generalized enough to use the base close() routine to close sockets. The socket to close is passed in the parameter sockfd.
For the assembler routine, the socket to close is passed in the A register.
Return values
The C routine returns -1 if an error occurs.
The assembly language routine sets the carry flag, and returns the error code in A if the call fails.