lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] LWIP 1.4.1 uploading problem


From: vass . szabolcs
Subject: Re: [lwip-users] LWIP 1.4.1 uploading problem
Date: Mon, 17 Oct 2016 15:55:12 +0300
User-agent: Zooku RC Webmail/1.0

Hello,

In the recent months I got another project, and didn't have any time to work with my previous project where I got the uploading problem. Today I started again and I looked after the problem. The problem source originate from TCP window size. So thank You You advices. I get a define LWIP_HTTPD_POST_MANUAL_WND what in my project was set to 0 in default. In some forums was written that with this we can throttle up the data receiving. I set this defin variable to 1 but nothing happenned, because the functions(for example httpd_post_data_recved(void *connection, u16_t recved_len)) which it enable didn't call anywhere.

My question is that, if I enabled the LWIP_HTTPD_POST_MANUAL_WND must I use the httpd_post_data_recved(void *connection, u16_t recved_len) function instead of httpd_post_receive_data(void *connection, struct pbuf *p)? Or combine it? Please help me because I'm a little bit confused.

Thank You for Your help,
Szabolcs


On 2016-08-03 17:40, Sergio R. Caprile wrote:
@Simon: oops, didn't take my pills and Z80assembly-induced dyslexia
jumped in... ;^) I meant "server", my mistake.
@Noam: My server does have POST, multipart (beginning) and login
(plain). We could join forces and have a good server in github or
wherever, I have lots of ideas but my development time has shifted to
more mundane and somehow paid projects. At the time I asked, no one
seemed to show interest. I forked from the "official" server to avoid
supporting the old CGI and SSI structure, which I didn't (don't) like
(at all)(matter of personal taste), and my brain can't keep such a
level of complexity. My CGI scheme is loosely based on the idea behind
the Rabbit (Z-World), which I've been using for a long time.
@Szabolcs: you can (almost) always capture only client and server
traffic, and post reduced pieces of code where we can see how you are
using the stack.
Example for a TCP receive callback:
static err_t myrecv(void *arg, struct tcp_pcb* pcb, struct pbuf *p, err_t err)
{
        if ((p == NULL) || (err != ERR_OK)){
                ...
                myclose(pcb);
                return ERR_OK;
        }
        ...
        read p data
        do something with that
        ...
        tcp_recved(pcb, p->tot_len); <--- handle TCP window
        pbuf_free(p);                   <--- free receive buffer
        ...
        return ERR_OK;
}

However, it's your call.
I can't help with the server post cgi callbacks, I changed that scheme
in my server and didn't get to use the "official" one. However,
somebody, somewhere, has to do what Simon said and I marked on the
pseudocode for you; look for it.


_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users



reply via email to

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