8000 请教新旧版本speventcb.cpp中让人费解的问题 · Issue #24 · spsoft/spserver · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

请教新旧版本speventcb.cpp中让人费解的问题 #24

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

Open
GoogleCodeExporter opened this issue Mar 14, 2015 · 1 comment
Open

Comments

@GoogleCodeExporter
Copy link
旧版本中speventcb.cpp的onAccept函数中,
event_set( session->getReadEvent(), clientFD, EV_READ, onRead, session );
调用后,紧接着又调用了AddEvent(),而AddEvent()中又调用了event_se
t,这里是特意这样调
用的吗,还是我对libevent的函数使用没有理解对?

而在新版本中speventcb.cpp的onAccept函数中,
event_set( session->getReadEvent(), clientFD, EV_READ, onRead, session );

这里注册了回调函数,但没看到event_add的调用,同旧版本完��
�不同了,去掉了AddEvent的调
用,是有特别的用意吗

望不吝赐教,谢谢

Original issue reported on code.google.com by decker...@gmail.com on 7 Sep 2009 at 1:45

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

No branches or pull requests

1 participant
0