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

Please include support for boost 1.70 #133

Open
mcelhennyi opened this issue Mar 25, 2020 · 0 comments
Open

Please include support for boost 1.70 #133

mcelhennyi opened this issue Mar 25, 2020 · 0 comments

Comments

@mcelhennyi
Copy link

Issue

In boost 1.7 the use of the io_context and the strand has been changed. This causes a breaking change in the Socket/Connection.cpp compilation in the constructor for the variable m_strand and m_heartbeatTimer. The call to p_socket.get_executor().context() fails and is no longer supported.

Below are some links to similar posts about this in other places:
boost asio issues
rstudio issues
boost docs
boost beast issues

Changes to get it building

  • I cloned the repo, removed the m_strand from the Connection.h/cpp file.
  • I replaced line 62 boost::asio::ip::tcp::socket socket(m_ioContext); in client.cpp with boost::asio::ip::tcp::socket socket(boost::asio::make_strand( m_ioContext ));
  • I changed the m_heatbeatTimer construction in the connection.cpp file to be this instead m_heartbeatTimer(p_socket.get_executor())

I am unsure if these changes are proper, but it was enough to get it building and for my use I will not need this class. I see there are other topics about this, but this seems like a simple fix if what I did is still semantically/functionally correct (my knowledge of boost is very low).

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

1 participant