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

EWOULDBLOCK is set by read() #8

Open
intc opened this issue Apr 27, 2019 · 1 comment
Open

EWOULDBLOCK is set by read() #8

intc opened this issue Apr 27, 2019 · 1 comment

Comments

@intc
Copy link

intc commented Apr 27, 2019

Hi!

Thought to give a short comment because of the heart warming "It ain't much, but it's honest work" approach. =)

While reading envelop.c (only the event loop part to be exact), noticed that you are checking EWOULDBLOCK in a weird place.

Using event loop in it self does not require non blocking socket. You can check a nicely written epoll (very minimalistic, blocking) variant in here: https://github.com/WhaleGirl/epoll-Server-client.

In practice how ever.. one runs out of the read buffer sooner or later?

For a non-blocking scenario I'd recommend to check this: https://eklitzke.org/blocking-io-nonblocking-io-and-epoll. This should give you the correct direction.

Keep up with your good (and honest ;) work!

@flouthoc
Copy link
Owner

@intc Thanks a lot for sharing these links. I really appreciate and yes using EWOULDBLOCK here doesn't makes any sense. I'll just go through these references and change the code.

Cheers 😄

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

2 participants