Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Doubt] Updating epoll interest list Upon EAGAIN/EWOULDBLOCK while sending #8

Open
PrashanthaTP opened this issue Dec 19, 2024 · 0 comments

Comments

@PrashanthaTP
Copy link

Inside HandleEpollEvent function,
Upon EPOLLOUT, if EAGAIN/EWOULDBLOCK occurs, the client fd is being readded to epoll list,
but shouldn't it be just modified as done while doing recv?

EPOLLOUT

if (errno == EAGAIN || errno == EWOULDBLOCK) { // retry
control_epoll_event(epoll_fd, EPOLL_CTL_ADD, fd, EPOLLOUT, response);

EPOLLIN

} else {
if (errno == EAGAIN || errno == EWOULDBLOCK) { // retry
request->fd = fd;
control_epoll_event(epoll_fd, EPOLL_CTL_MOD, fd, EPOLLIN, request);

Also is it required to do this? or can we just skip this part without doing any modification to interest list and retry when EAGAIN/EWOULDBLOCK happens?

Thanks in advance,

--
Thanks a lot for opensourcing this project :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant