套接口地址结构(3)

2020-12-05 00:40

学习笔记

6.3 select函数

1、

#include<sys/select.h>

#include<sys/time.h>

Int select(int maxfdp1,fd_set * readset, fd_set * writeset, fd_set * exceptset, const struct timeval * timeout);

2、所需输入数据结构

Struct timeval

{

Long tv_sec;

Long tv_usec;

}

3、所用到的宏

Void FD_ZERO(fd_set * fdset);

Void FD_SET(int fd, fd_set * fdset);

Void FD_CLR(int fd, fd_set * fdset);

Int FD_ISSET(int fd, fd_set * fdset);

6.6 shutdown函数

#include<sys/socket.h>

Int shutdown(int sockfd,int howto);

6.9 pselect函数

1、

#include<sys/select.h>

#include<signal.h>

#include<time.h>

Int pselect(int maxfdp1,fd_set * readset, fd_set * writeset, fd_set * exceptset, const struct timespec* timeout, const sigset_t * sigmask);

2、 所需输入的数据结构

Struct timespec

{

Time_t tv_sec;

Long tv_nsec;

}

6.10 poll函数

1、

#include<poll.h>

Int poll(struct pllfd * fdarray,unsigned long nfds,int timeout);

3、 所需输入的数据结构

Struct pollfd

{


套接口地址结构(3).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:高考中常见的六种病句类型

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: