epoll_ctl
- 接口定义
int epoll_ctl(int epfd,int op,int fd,struct epoll_event *event)
- 接口描述
- 接口约束
- 参数说明
表1 参数说明 输入参数
输入/输出
范围
数据类型
含义
版本
“epfd”
I
>0
int
epoll实例的文件描述符
1.0.0
“op”
I
EPOLL_CTL_ADD
EPOLL_CTL_MOD
EPOLL_CTL_DEL
int
操作动作
1.0.0
“fd”
I
>=0
int
需要侦听的fd
1.0.0
“event”
I
valid ptr
struct epoll_event *
需要侦听的事件
1.0.0
- 接口返回值
表2 接口返回值 返回码
返回值
描述
SOCKET_ERR
“-1”
失败
SOCKET_OK
“=0”
成功
父主题: 对外接口