Syntax: Sockets - int socketstat(int s, struct stat *buf);
UnixLib - int fstat(int s, struct stat *buf);
Header: Sockets - socklib.h
UnixLib - sys/stat.h
Returns: 0 for success, EOF if failed
The only meaningful fields of the status structure filled in when stat() is applied to a socket are st_mode and st_blksize.
st_mode equals S_IFSOCK if the descriptor given is recognised as a socket descriptor.
st_blksize gives the preferred send buffer size to use for the protocol (or 0 if unknown) which can improve performance by reducing fragmentation.
C definition SWI definition
|
|
|