Lines Matching refs:osfd
77 int osfd = socket(AF_INET, SOCK_DGRAM, 0); in CreateSocket() local
78 if (osfd < 0) in CreateSocket()
85 if (ioctl(osfd, FIONBIO, &flags) < 0) in CreateSocket()
88 close(osfd); in CreateSocket()
89 osfd = -1; in CreateSocket()
95 int ret = bind(osfd, (struct sockaddr *)&_local_addr, sizeof(_local_addr)); in CreateSocket()
100 close(osfd); in CreateSocket()
101 osfd = -1; in CreateSocket()
106 this->SetOsfd(osfd); in CreateSocket()
109 frame->KqueueNtfyReg(osfd, this); in CreateSocket()
110 frame->KqueueCtrlAdd(osfd, KQ_EVENT_READ); in CreateSocket()
112 return osfd; in CreateSocket()
117 int osfd = this->GetOsfd(); in CloseSocket() local
118 if (osfd > 0) in CloseSocket()
121 frame->KqueueCtrlDel(osfd, KQ_EVENT_READ); in CloseSocket()
122 frame->KqueueNtfyReg(osfd, NULL); in CloseSocket()
125 close(osfd); in CloseSocket()
146 int osfd = this->GetOsfd(); in InputNotify() local
150 ret = ff_hook_recvfrom(osfd, buff, _msg_buff->GetMaxLen(), in InputNotify()
160 MTLOG_ERROR("recv error, fd %d", osfd); in InputNotify()
166 MTLOG_DEBUG("remote close connection, fd %d", osfd); in InputNotify()
181 have_rcv_len, osfd); in InputNotify()
252 int osfd = this->GetOsfd(); in KqueueCtlAdd() local
257 MTLOG_ERROR("epfd ref conflict, fd: %d, old: %p, now: %p", osfd, old_obj, this); in KqueueCtlAdd()
261 if (!frame->KqueueCtrlAdd(osfd, KQ_EVENT_WRITE)) in KqueueCtlAdd()
277 int osfd = this->GetOsfd(); in KqueueCtlDel() local
282 MTLOG_ERROR("epfd ref conflict, fd: %d, old: %p, now: %p", osfd, old_obj, this); in KqueueCtlDel()
286 if (!frame->KqueueCtrlDel(osfd, KQ_EVENT_WRITE)) in KqueueCtlDel()