-
Notifications
You must be signed in to change notification settings - Fork 78
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
JSON-Data? #5
Comments
you need to remove addslashes and send data as JSON
Фаиль Галиевич Шахмаев |
Спасибо друг за простой такой клиент |
Please give a sample, I always get a string on server side. How to correctly send JSON data ? |
You can send the JSON data as String. Just use json-encode/json_decode method. |
I know this, but I need a JSON on server side because it's a bridge and I don't want to modify the server code. My code :
My mod inside your class :
My server don't get the "robotserveur" (but I get a string type with your addslashes!) |
I must wireshark the content:( |
WebSocket content is not clear (gzip) ! I can't fgrep my string value inside a JSON.
|
No news to get a server side object and not a string ? |
Socket.io has "automatic JSON encoding/decoding" when I use .emit() |
I found the problem !!! Don't double quote the JSON string ! and I finally get my server side object :) socket.io sample frame :
Mod inside the class :
My PHP socket.io client :
issue closed:) |
Hi,
how i can change this great Class to send json-data?
$data = json_encode ( array ( 'var' => 'content' ) )
fwrite($fd, $this->hybi10Encode('42["' . $action . '", "' . addslashes($data) . '"]'));
Thank you
The text was updated successfully, but these errors were encountered: