....
requestType = decodeHttpMessage (data, &outputMessage[0], &messageLength);
if(requestType)
{
//WebSocket Message
pmessage = &outputMessage[0];
hs->file = pmessage;
hs->left = 129;
pbuf_free(p);
http_send_data(pcb, hs);
/* Tell TCP that we wish be to informed of data that has been
successfully sent by a call to the http_sent() function. */
tcp_sent(pcb, http_sent);
}
else
{ //The provided implementation for serving HTML. Here, it works }
...
- I get ERR_CONNECTION_RESET in Chrome at websocket = new WebSocket("ws://
192.168.0.122");
- I am getting ERR_OK from the call to tcp_write(....)
- http_poll is called 4 times and finally it calls TCP_ABORT.
- After entering to the websocket part of the IF statement once, no more connections are accepted. That doesn't happen if I just ask for the webpage and reload it many times.
Thanks in advance!
--
Leonardo Martinez.