| 269 | } |
| 270 | |
| 271 | int UdpSessionNtfy::KqueueCtlDel(void* args) |
| 272 | { |
| 273 | MtFrame* frame = MtFrame::Instance(); |
| 274 | KqFdRef* fd_ref = (KqFdRef*)args; |
| 275 | //ASSERT(fd_ref != NULL); |
| 276 | |
| 277 | int osfd = this->GetOsfd(); |
| 278 | |
| 279 | KqueuerObj* old_obj = fd_ref->GetNotifyObj(); |
| 280 | if (old_obj != this) |
| 281 | { |
| 282 | MTLOG_ERROR("epfd ref conflict, fd: %d, old: %p, now: %p", osfd, old_obj, this); |
| 283 | return -1; |
| 284 | } |
| 285 | |
| 286 | if (!frame->KqueueCtrlDel(osfd, KQ_EVENT_WRITE)) |
| 287 | { |
| 288 | MTLOG_ERROR("epfd ref del failed, log"); |
| 289 | return -2; |
| 290 | } |
| 291 | this->DisableOutput(); |
| 292 | |
| 293 | return 0; |
| 294 | |
| 295 | } |
| 296 | |
| 297 | int TcpKeepNtfy::InputNotify() |
| 298 | { |
nothing calls this directly
no test coverage detected