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

Integrate into asio::io_service on C++ application #230

Open
CharlesJQuarra opened this issue Dec 22, 2023 · 1 comment
Open

Integrate into asio::io_service on C++ application #230

CharlesJQuarra opened this issue Dec 22, 2023 · 1 comment

Comments

@CharlesJQuarra
Copy link

I have an existing C++ client/server application using boost::asio that relies on UDP messaging, and I want it to support broader clients through NAT setups, libjuice seems the best fit, but I'm not clear how to integrate my existing code with this, as they seem to use their own polling loop

@paullouisageneau
Copy link
Owner

libjuice relying its own internal polling thread is not an issue, you just need to call io_service.post(handler) in callbacks to reschedule execution on the asio event loop.

If I'm not mistaken asio::io_service is deprecated and replaced by asio::io_context, for which you should use post(io_context, handler).

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