Re: [lwip-users] LWIP and Websockets

2015-10-26 Thread Sergio R. Caprile
> What do you mean with proper value? I mean the value you return when you exit in a function, the whole web server code knows what the callee has done and needs to be done by means of the returned value. -- ___ lwip-users mailing list

Re: [lwip-users] LWIP and Websockets

2015-10-26 Thread Mike He
Hi Leonardo, I have written a Websocket server on top of lwip, and can try to help you directly. Just briefly looking at the code you posted though, a lot seems to be missing though. Certainly, there is no way to tell if you are properly returning a Websocket handshake given the code

Re: [lwip-users] LWIP and Websockets

2015-10-26 Thread Leonardo Martínez
I understand what you are saying but I don't get how is not a single entry point: TCP_RECV is "Used to specify the function that should be called when a TCP connection receives data". This function has to be fired when new data comes. I can get that this process may have to be retried many times.

Re: [lwip-users] LWIP and Websockets

2015-10-26 Thread Sergio R. Caprile
> - If I need to wait for a handshake in the HTTP form, it would be fine > if I start with a HTTP server. As I understand it, HTTP server is mostly > a TCP server with some retries and the particular communication scheme > (Get, post, etc.). No it is not >> A web server is a delicate piece of

Re: [lwip-users] LWIP and Websockets

2015-10-26 Thread Leonardo Martínez
Hi Mike, Thanks for helping me. Here is the code that calculates the response and do the parsing in look for the handshake. It is still pretty primitive but I wanted to get it to work first, at least for chrome, and then I would try to cover more cases. static bool decodeHttpMessage (char *