-
Notifications
You must be signed in to change notification settings - Fork 554
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
Getting 404 error on server and client side says 'Disconnected' #124
Comments
GET /socket.io/?EIO=3&transport=polling&t=1474750479445-0 HTTP/1.1 HTTP/1.1 200 OK |
GET /socket.io/?EIO=3&transport=polling&t=1474750479505-1&sid=980653b7146d4c8595ca7f88369881f4 HTTP/1.1 HTTP/1.1 200 OK |
These are the HTTP transfer when I traced them in my browser plugin when tried to connect to the same server using javascript client code and socketio |
It seems that this: |
socket.io is based on WebSockets, you need additional session handling. how do your code looks like? |
OK I solved it by modifying the url parameter in begin() function. The URL parameter in beginSocketIO() does not do the right thing. |
Now I ran into another issue, not issue actually. how would I parse the payload from the server if Arduino is acting as a client. I need to know event type and the JSON string from the received payload. |
may https://gist.github.com/Links2004/25966845ed38278bb4a2f4a44b5a30fb the message handling is stating here: |
In your socket.io client there is a type SocketIO_msg_t can you please give me that class, also what does that means: [message id ('+')] ':' [message endpoint] ':' [json]. |
SocketIO_msg_t:
is the protocol description of the socket.io version 0.9 |
How to retrieve this [json] from this protocol? I guess I would need this [json] part. Can't I do this using your public library WebsocketsClient. Your secret library SocketIO is giving me hard time to get understood and the time is running out. |
When I use payload with index notation like payload[0] as you performed message type checking in your Socketio client library, my WiFi starts restarting after every connection. |
may this helps you: I use the same lib to decode json. DynamicJsonBuffer jsonBuffer;
JsonObject& root = jsonBuffer.parseObject((char *) data); where |
@Fawadkhalil |
Can you show me the debug trace from serial monitor? Are you trying to connect to socketio server? |
by the way, just change the default parameter value of url as "/socket.io/?EIO=3" from "/" at |
I can fix the problem now. I want to use your code (web socket client side) I use your code with a little change "webSocket.begin("158.108.166.160", Thx, Ram On Thu, Oct 20, 2016 at 3:44 PM, FawadKhalil notifications@github.com
|
You can visit my git here: On Thu, Oct 20, 2016 at 3:53 PM, Atitep.Ram atitep.ram@gmail.com wrote:
|
When I try to connect to server the response is "GET / HTTP/1.1" 404 342 0.002334
I can connect to the server with another client code written in javascript using socketio but can't connect using Arduino. Please help me it's urgent.
I tested it with javascript sever code and python server code and same results.
The text was updated successfully, but these errors were encountered: