Home | History | Annotate | Download | only in epoll_server

Lines Matching refs:cb

116     CB* cb = cb_iter->cb;
119 if (cb) {
120 cb->OnShutdown(this, fd);
190 void EpollServer::RegisterFD(int fd, CB* cb, int event_mask) {
191 CHECK(cb);
199 CB* other_cb = fd_i->cb;
209 fd_i->cb = cb;
214 cb_map_.insert(CBAndEventMask(cb, event_mask, fd));
221 cb->OnRegistration(this, fd, event_mask);
258 void EpollServer::RegisterFDForWrite(int fd, CB* cb) {
259 RegisterFD(fd, cb, EPOLLOUT);
262 void EpollServer::RegisterFDForReadWrite(int fd, CB* cb) {
263 RegisterFD(fd, cb, EPOLLIN | EPOLLOUT);
266 void EpollServer::RegisterFDForRead(int fd, CB* cb) {
267 RegisterFD(fd, cb, EPOLLIN);
272 if (cb_map_.end() == fd_i || fd_i->cb == NULL) {
280 CB* cb = fd_i->cb;
285 cb->OnUnregistration(fd, false);
286 // fd_i->cb is NULL if that fd is unregistered inside the callchain of
289 // erase the entry if it is in use. Thus, a NULL fd_i->cb is used as a
298 fd_i->cb = NULL;
329 if (fd_i == cb_map_.end() || fd_i->cb == NULL) {
414 if (cb_map_.end() != fd_i && fd_i->cb != NULL) {
443 fd_i->cb != NULL &&
477 AlarmCB* cb = iterator_token->second;
479 all_alarms_.erase(cb);
480 cb->OnUnregistration();
545 << " registered with cb: " << it->cb;
616 if (fd_i->cb != NULL) {
627 fd_i->cb->OnModification(fd, event_mask);
713 // UnRegister call will now simply set the cb to NULL instead of
717 cb_and_mask->cb->OnEvent(cb_and_mask->fd, &event);
723 if (cb_and_mask->cb == NULL) {
747 AlarmCB* cb = i->second;
751 alarms_reregistered_and_should_be_skipped_.find(cb)
757 all_alarms_.erase(cb);
758 const int64 new_timeout_time_in_us = cb->OnAlarm();
770 << " " << cb
774 alarms_reregistered_and_should_be_skipped_.insert(cb);
776 RegisterAlarm(new_timeout_time_in_us, cb);