setsockopt SO_SNDTIMEO, SO_RCVTIMEO

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



setsockopt option, SO_SNDTIMEO and SO_RCVTIMEO implemented?


in linux/net/core/sock.c sock_setsockopt follow

                case SO_RCVTIMEO:
                        ret = sock_set_timeout(&sk->rcvtimeo, optval,
optlen);
                        break;

                case SO_SNDTIMEO:
                        ret = sock_set_timeout(&sk->sndtimeo, optval,
optlen);
                        break;

timeval is setting socket buffer
but man 7 socket is ...

       SO_RCVTIMEO and SO_SNDTIMEO
              Specify the sending or receiving timeouts until reporting an
error.   They  are
              fixed  to  a  protocol  specific setting in Linux and cannot
be read or written.
              Their functionality can be emulated using alarm(2) or
setitimer(2).


man 7 scoket told me socket timeout can't change!!
Which is ture?

-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux