Loading...
Select Version
&pagelevel(3)&pagelevel
#include <sys.socket.h>
Kernighan-Ritchie-C:
int soc_getc(s);
int s;
ANSI-C:
int soc_getc(int s);
Description
The soc_getc() function is only supported in the AF_INET and AF_INET6 address families and can only be used on stream sockets.
The soc_getc() function reads the next character from the input buffer of socket s and returns the character as the result.
Return value
Integer value of the read character:
If successful.
EOF:
If no character could be read due to the end-of-file (EOF) condition.
Errors indicated by errno
EWOULDBLOCK
The socket is marked as non-blocking, and the requested operation would block.