computer shop News
1 getsockopt and setsockopt int getsockopt (int sockfd, int level, int optname, void * optval, socklen_t * optlen) int setsockopt (int sockfd, int level, int optname, const void * optval, socklen_t * optlen) level of the socket-level control can take three values:. 1) SOL_SOCKET: General socket option 2) IPPROTO_IP:. IP option 3. IPPROTO_TCP: TCP option. optname specifies the way of control (the name of the option), we explain in detail below optval get or set the socket option. Convert according to the data type of the option name Option name description data type ====== =========================================================== ================ SOL_SOCKET --------------------------------- --------------------------------------- SO_BROADCAST Allows sending broadcast data int SO_DEBUG Allows debugging int SO_DONT ROUTE int the SO_ERROR obtained without searching the routing socket error int int the SO_LINGER the SO_KEEPALIVE remain connected to close the connection delay struct linger SO_OOBINLINE band data into the normal data stream receiver buffer size the SO_RCVBUF int int int SO_RCVLOWAT the SO_SNDBUF transmission buffer size limit receive buffer int SO_SNDLOWAT send buffer limit int SO_RCVTIMEO receive timeout struct timeval SO_SNDTIMEO send the timeout struct timeval SO_REUSERADDR allow reuse of local address and port int SO_TYPE obtained socket type int SO_B SDCOMPAT is compatible with BSD system int ==================================================== ===================================== IPPROTO_IP ------------------- -------------------------------------------------- ----- IP_HDRINCL contains the IP header int IP_OPTINOS IP header options int IP_TOS service type int ======================== IP_TTL survival time in the packet =========================================================== IPPRO_TCP ------------------------------------------------- ------------------------- TCP_MAXSEG TCP maximum data segment size int TCP_NODELAY does not use Nagle algorithm int =========== =========================================================== ============ For more information on these options, please see Linux Programmer's Manual 2 ioctl ioc Tl can control all file descriptors. Here is an introduction to the options for controlling sockets. int ioctl(int fd,int req,...) ================ =========================================================== ======== ioctl control options -------------------------------------- ------------------------------------ SIOCATMARK Whether to reach the out-of-band tag int FIOASYNC Asynchronous input/output flag int FIONREAD Buffer Readable Bytes int ================================================ =================================== Detailed options please use man ioctl_list to view.
Slightly larger sites are inevitably load balanced, but hardware load balancing is expensive. There
Linux has created a friendly environment that gives us the possibility to choose. For example, most
Executing programs are called processes. When a program is stored in an executable file and is runni
1. Introduction to LVS1. Provide high availability and load balancing capabilities for application s
Powerful screen commands in Linux systems
SUSE Linux login black screen solution
Reset MySQL root password under Linux
Linux system how to set up a backup
Linux interprocess communication shared memory mode
What to do if the busybox verification fails
Linux sar command using basic tutorial
Introduction to Linux Cluster Technology
How to restore the registry in Win8 system
What if Win7 cannot be automatically updated and the update fails?
Win 8 photo app appreciation and simple editing picture
How to uninstall the Win10 application comes with win10 tips
Win8 finds the control panel in the application list.
Win7 system to quickly locate photos and quick document search methods
How to open the Modern Sound Control Interface