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

Exception when calling asio::ip::tcp::socket socket(asio::io_service); #1

Open
tikotus opened this issue Sep 14, 2016 · 1 comment
Open

Comments

@tikotus
Copy link

tikotus commented Sep 14, 2016

I'm trying to use the asio port to make http requests. I'm building with -D ASIO_STANDALONE and -D ASIO_HEADER_ONLY (the latter is redundant I think, but just to be sure). Here is a code snippet I'm running

asio::io_service io_service;
asio::ip::tcp::resolver resolver(io_service);
asio::ip::address addr = asio::ip::address::from_string("127.0.0.1");
asio::ip::tcp::endpoint endpoint(addr, 80);
asio::ip::tcp::socket socket(io_service);
// some more code to make the actual request, which is irrelevant at the moment

This works on OS X but in browser I get an exception that can't be caught from the call to socket constructor. I tried to track down where the exception comes from. It seems to come from somewhere inside the call to factory(owner) on line 131 in service_registry.ipp with reactive_socket_service_base constructor in the callstack.

Any ideas what is wrong? Should this work and is someone else able to run it?

@cynecx
Copy link
Contributor

cynecx commented Sep 14, 2016

Sorry, I am kinda busy these months so I wasn't able to properly work on this.
Can you try applying this pr? emscripten-core/emscripten#4378

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