setsockopt()
Peter Kundrat
kundrat na napri.sk
Čtvrtek Březen 6 14:17:00 CET 1997
On Mar 6, Tomas Cermak wrote
> Tusite nekdo, jak se nastavi timeout pro vytvoreny socket?
> Ve spouste cteni je neco jako:
> setsockopt(sck, SOL_SOCKET, SO_RCVTIMEO, &timeout,
> sizeof(timeout));
> Tohle je asi to, co potrebuji, ale nikde nemuzu najit definici
> symbolicke konstanty SO_RCVTIMEO ani SO_SNDTIMEO.
nut$ man setsockopt
SYNOPSIS
#include <sys/types.h>
#include <sys/socket.h>
...
Optname and any specified options are passed uninterpreted
to the appropriate protocol module for interpretation.
The include file <sys/socket.h> contains definitions for
socket level options, described below.
alebo:
nut$ find /usr/include -follow -type f -name \*.h | xargs -n20 grep SO_RCVTIM
/usr/include/asm/socket.h:#define SO_RCVTIMEO 20
pk
--
kundrat na napri.sk, Peter KUNDRAT, http://www.napri.sk/~kundrat/
** It's hard to argue that God hated Oklahoma. If He didn't, why is it so
** close to Texas?
Další informace o konferenci Linux