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

Error on run time websocket broadcast #67

Open
sirAlireza opened this issue Oct 12, 2018 · 0 comments
Open

Error on run time websocket broadcast #67

sirAlireza opened this issue Oct 12, 2018 · 0 comments

Comments

@sirAlireza
Copy link

when i trying to run the websocket.o with this command: ./ws 8000
i get this error message:

terminate called after throwing an instance of 'std::length_error'
  what():  basic_string::_M_create
[1]    3759 abort (core dumped)  ./ws 8000

and some times this error:

terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
[1]    3972 abort (core dumped)  ./ws 8000

i think the problem is this part of code :

  auto rclient = make_wspp_remote_client( _message * parameters(_text) );

  // The server websocket api accessible by the client.
  auto server_api = ws_api(

    // Broadcast a message to all clients.
    _broadcast * parameters(_message) = [&] (auto p) {
      for (const wspp_connection& c : users) rclient(c).message(p.message);
    }

    );
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