[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] LWIP and Websockets

From: Sergio R. Caprile
Subject: Re: [lwip-users] LWIP and Websockets
Date: Mon, 26 Oct 2015 10:16:15 -0300
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

you have some board using some port from some manufacturer which uses
what API interface ? And runs with or without an RTOS (NO_SYS) ?
And that webserver is ?

As I see from your code, it looks like it is the RAW API with callbacks,
however, you are interacting with the webserver code, not with lwIP
directly. You should ask the ones who wrote the webserver code for guidance.
It looks similar to the lwip httpserver_raw code in the contrib tree. As
far as I can see, in that server, we don't play around with tcp_sent(),
it is setup at connection establishment. Then, you are messing around
with 'hs', the server http_state structure, which has many more fields
than the ones you are setting up, so it is quite likely you are
delivering the server an inconsistent structure and it fails to do its job.
If you expect the caller to send more data after you received something,
you have to call tcp_recved() before freeing the pbuf. Then I guess the
next data to you won't honor your 'requestType' detection, so you should
establish a state machine there. And you are patching this in what
function ?
A web server is a delicate piece of code and you are not expected to be
modifying around without knowing exactly what to do.
I have a working beta of a (somehow more polished) fork of the contrib
tree web server here:
If your application works with NOSYS=1 and the RAW API, whether you
decide to use mine or the "official" one, I can try to help you. If you
want to use the one that came with your manufacturer board, you have to
ask them for help.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]