Closed developernew123 closed 6 years ago
I tried sending it from javascript and html5 websockets as a string like this : "{ \"id\":2,\"method\" : \"Page.navigate\",\"params\" : {\"url\":\"http://twitter.com/#!/search/chrome?q=chrome\"} }" and it worked
but still doesn't in c++
this is my code :
WebSocket::pointer ws = WebSocket::from_url(wsurl);
assert(ws);
ws->poll();
cout << "sending : " << strpayload << endl;
ws->send(strpayload);
ws->dispatch(writes);
delete ws;
I want to send an array like this to chrome after I connected to it using websockets and remote debugging
{ id: 2, method: 'Page.navigate', params: {url: 'http://twitter.com/#!/search/chrome?q=chrome&' + rand(100).to_s} }