Int setsockopt (Socket s,Int level,Int optname,Const char * optval,Int optlen);
S (socket): point to an open set of interface descriptive wordsLevel: (level): Specifies the option code type.Sol_socket: basic set of interfacesIpproto_ip: IPv4
Int setsockopt (Socket s,Int level,Int optname,Const char * optval,Int optlen);
S (socket): point to an open set of interface descriptive wordsLevel: (level): Specifies the option code type.Sol_socket: basic set of interfacesIpproto_ip: IPv4
Setsockopt () usage (parameter description) recv, send timeout processing, setsockoptrecv
Source: recv send blocking and non-blocking
Int setsockopt (SOCKET s,Int level,Int optname,Const char * optval,Int optlen);
S (socket): point to an open set
Int setsockopt (Socket s,Int level,Int optname,Const char * optval,Int optlen);
S (socket): point to an open set Interface DescriptionLevel: (level): Specifies the option code type.Sol_socket: basic set of interfacesIpproto_ip: IPv4 InterfaceIpproto_
Int setsockopt (Socket s,Int level,Int optname,Const char * optval,Int optlen);
S (socket): point to an open set Interface DescriptionLevel: (level): Specifies the option code type.Sol_socket: basic set of interfacesIpproto_ip: IPv4 InterfaceIpproto_
# Include # Include Int setsockopt (int s, int level, int optname, const void * optval,Socklen_t optlen );S: socket, pointing to an open interface descriptionLevel: specifies the type of the Option Code. The specific types are as follows:SOL_SOCKET:
Transferred from: http://blog.csdn.net/zhonglinzhang/article/details/9183229Function Description:Gets or sets the options associated with a socket. Options may exist in multi-tier protocols , and they will always appear on the topmost socket layer.
In the programming of the SOCKET server application of asp.cn/class = wordstyle> WINDOWS, the following statements may be compared to the following:
S = socket (AF_INET, SOCK_STREAM, IPPROTO_TCP );
Saddr. sin_family = AF_INET;
Saddr.
Creation Time:
Article attributes: original
Article submitted: flashsky (flashsky1_at_sina.com)
Author: flashskyEmail: flashsky@xfocus.orgSite: www.xfocus.net www.shopsky.comReprinted, please indicate the original author's security focus
In the
From: http://lydnkj.bokee.com/viewdiary.10417372.html
Getsockopt and setsockopt
Obtain the set Interface Options:
Code:
Int getsockopt (INT sockfd, int level, int optname, void * optval, socklen_t * opteln) sets the set of Interface Options:Int
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.