libevent / libevent-book Goto Github PK
View Code? Open in Web Editor NEWNick's libevent manual
Home Page: https://libevent.org/libevent-book
License: Other
Nick's libevent manual
Home Page: https://libevent.org/libevent-book
License: Other
at line 241 of Ref2, the flag for O1 event notification shall be EV_FEATURE_O1 instead of EV_FEATURE_ET ?
if ((f & EV_FEATURE_ET))
printf(" Edge-triggered events are supported.");
if ((f & EV_FEATURE_ET)) <- EV_FEATURE_O1 ?
printf(" O(1) event notification is supported.");
if ((f & EV_FEATURE_FDS))
it is useful and I wanna take a try. Is it OK?
In
why named asynchronous IO?
In my opinion, asynchronous IO
is use like aio_write, aio_read
, but libevent use like epoll
, so there should use synchronous nonblocking IO
Notice a broken link on http://www.wangafu.net/~nickm/libevent-book/TOC.html
The "Working with events" sections mentions user-triggered events, but then doesn't discuss a canonical way of having user-triggered events.
Can this be added?
Here: https://github.com/nmathewson/libevent-book/blob/master/Ref6_bufferevent.txt#L271
The sockaddr_in is memset and the sin_addr and sin_port are set, but sin_family is not, leading to error 47 (Address family not supported by protocol family)
.
Hi,
I think that the following is right.
The return value from evutil_inet_pton() is 1 on success, -1 on invalid af, and 0 on invalid address format.
Hey,
This bufferevent_base_connect()
function is mentionned in the book around here https://github.com/nmathewson/libevent-book/blob/9e9e5242f6fcd4cc6bfe564c22756ab6f5ce5914/Ref6_bufferevent.txt#L296
I can not find any other occurence of it in the book or in the libevent api.
Should I be reading bufferevent_socket_connect()
instead ?
Seems like there is a problem with asciidoc 8.6.3
$ make pdf
a2x -f pdf LibeventBook.txt
a2x: ERROR: xmllint --nonet --noout --valid /Users/tcurdt/Desktop/libevent-book/LibeventBook.xml returned non-zero exit status 4
make: *** [LibeventBook.pdf] Error 1
In nmathewson/libevent-book/blob/master/Ref4_event.txt under _constructing_signal_events there is a warning about setting timers from signal callback "It might not be supported".
I did a SIMPLE test and did not run into a problem, furthermore it would make sense for this to potentially be a problem in the signal handler itself, rather than the callback. I assume that the callback should be executing in the event-loop context and thus should be okay. In either case, IMO this should either go away or become more definitive, i.e. list cases, environments where it is not supported.
Thanks
-Nevo
In file "01intro.txt"
/* Add all of the interesting fds to readset */
for (i=0; i < n_sockets; ++i) {
if (fd[i]>maxfd) maxfd = fd[i];
FD_SET(i, &readset);
}
Should it be FD_SET(fd[i], &readset)? I'm not sure about it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.