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

issues when adding multiple bufferevent flags #467

Closed
kushal4 opened this issue Feb 21, 2017 · 5 comments
Closed

issues when adding multiple bufferevent flags #467

kushal4 opened this issue Feb 21, 2017 · 5 comments

Comments

@kushal4
Copy link

kushal4 commented Feb 21, 2017

The thing i am transferring the data which is read from server via socket to multiple threads so i am setting bufferevent flags like

 int flags = BEV_OPT_THREADSAFE | BEV_OPT_CLOSE_ON_FREE;
  bufferevent_setcb(be, readcb, writecb, eventcb, cbarg);

when i am doing this i am getting some error that ' failed to create libevent bufferevent and the server program stops receiving from the client '.Could you please tell me where am i going wrong? Is it the correct way to set multiple flags?

@kushal4
Copy link
Author

kushal4 commented Feb 22, 2017

when i only set the second flag only it works well for joinable threads but when i use it for parrallel thread the data is not well read from the socket i mean i dont recieve the desired characters send from the client end to server but in the wireshark i see the client sends the character properly even when using parrallel thread

@kushal4
Copy link
Author

kushal4 commented Feb 24, 2017

how to enable thread support for bufferevent

@azat
Copy link
Member

azat commented Feb 28, 2017

Can you please reduce you program to 100 lines reproducer (or something like this) and post it here or here ?

P.S. and please use markdown

@kushal4
Copy link
Author

kushal4 commented Feb 28, 2017

hi,
This issue has been solved for now will update here if any problem crops up anytime
Thanks ,
Kushal

@kushal4
Copy link
Author

kushal4 commented Feb 28, 2017

i am using smart pointers now and due to that the problem is not occuring till now

@kushal4 kushal4 closed this as completed Feb 28, 2017
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

2 participants