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

A question about code of the libevent book Chapter 1 #1377

Closed
rickyrick2002 opened this issue Nov 19, 2022 · 0 comments
Closed

A question about code of the libevent book Chapter 1 #1377

rickyrick2002 opened this issue Nov 19, 2022 · 0 comments

Comments

@rickyrick2002
Copy link

rickyrick2002 commented Nov 19, 2022

https://libevent.org/libevent-book/01_intro.html

In the example of

Example: select()-based ROT13 server
...

in do_write, there's a line:

state->n_written = state->write_upto = state->buffer_used = 0;

why is it changed and set to 1

state->n_written = state->write_upto = state->buffer_used = 1;

in the following

Example: A low-level ROT13 server with Libevent
....

example ?
Is it a typo or intention?

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

No branches or pull requests

1 participant