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);
}
);
when i trying to run the websocket.o with this command: ./ws 8000 i get this error message:
and some times this error:
i think the problem is this part of code :