Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
getpeername() z/OS Communications Server: IP Sockets Application Programming Interface Guide and Reference SC27-3660-00 |
|
The getpeername() call returns the name of the peer connected to socket descriptor s. For AF_IUCV, namelen must be initialized to reflect the size of the space pointed to by name; it is set to the number of bytes copied into the space before the call returns. For AF_INET, the input value in the contents of namelen is ignored, but is set before the call returns. The size of the peer name is returned in bytes. If the buffer of the local host is too small to receive the entire peer name, the name is truncated.
Return valuesThe value 0 indicates success;
the value -1 indicates an error. Errno identifies the specific error.
Related callsaccept(), connect(), getsockname(), socket() |
Copyright IBM Corporation 1990, 2014
|