![]() Chapter Contents |
![]() Previous |
![]() Next |
| takesocket_pid |
| Portability: | SAS/C extension |
| SYNOPSIS | |
| DESCRIPTION | |
| RETURN VALUES | |
| CAUTION | |
| PORTABILITY | |
| RELATED FUNCTIONS |
| SYNOPSIS |
#include <sys/types.h> #include <sys/sockets.h> int takesocket_pid(struct clientpid *clientpid, int s, pid_t pid); struct clientpid * clientpid; /* pointer to the clientpid structure */ int s; /* socket identifier */ pid_t pid; /* process ID from getclientpid() */
| DESCRIPTION |
| RETURN VALUES |
If takesocket_pid
succeeds, it returns the socket identifier, that is, either a socket descriptor
or a token. Otherwise, it returns a
-1
, and sets errno to indicate the error.
Note:
The clientpid structure
upon return will contain the following values:
domain |
the domain of the socket to be taken, default = AF_INET. |
pid |
the process ID number of client process. |
sid |
socket identifier. |
clientpid
structure are set to binary zeros (0x00). ![[cautionend]](../common/images/cautend.gif)
| CAUTION |
| PORTABILITY |
| RELATED FUNCTIONS |
getclientid, getclientpid,
givesocket, givesocket_pid, takesocket
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.