leolib2004
Junior Member level 3
Hi All,
I am working with the Atmel Xplained Ultra Board and its LWIP sample code. I would like to be able to exchange messages with a HTML5 app using WebSockets.
My idea is to modify the sample code to answer to the handshake and then, without closing the connection, exchange websockets messages directly there, within the already established connection.
Well, I have obtained the handshake request and correctly made the response (using SHA-1 and base64 as in https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API/Writing_WebSocket_servers).
But, no tcp message is being sent to the browser by my board as a handshake response. I don't know why because the code is exactly as it works while serving a webpage. ( the library is pretty high level there and I can see the corresponding responses as strings before being sent but magically one is sent (the one asking for the html) but the websocket isn't.
I am also using Hercules to test this and I can see that if I ask for the website, I get it, but if I send a websocket handshake, the response does not show up.
What can it be? Is it something wrong with my reasoning?
PS: I could attach some code if it's needed
I am working with the Atmel Xplained Ultra Board and its LWIP sample code. I would like to be able to exchange messages with a HTML5 app using WebSockets.
My idea is to modify the sample code to answer to the handshake and then, without closing the connection, exchange websockets messages directly there, within the already established connection.
Well, I have obtained the handshake request and correctly made the response (using SHA-1 and base64 as in https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API/Writing_WebSocket_servers).
But, no tcp message is being sent to the browser by my board as a handshake response. I don't know why because the code is exactly as it works while serving a webpage. ( the library is pretty high level there and I can see the corresponding responses as strings before being sent but magically one is sent (the one asking for the html) but the websocket isn't.
I am also using Hercules to test this and I can see that if I ask for the website, I get it, but if I send a websocket handshake, the response does not show up.
What can it be? Is it something wrong with my reasoning?
PS: I could attach some code if it's needed