[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] tcp client build up the connection slowly with the serv
From: |
koszo.simon |
Subject: |
Re: [lwip-users] tcp client build up the connection slowly with the server |
Date: |
Tue, 25 Jun 2019 23:35:30 -0700 (MST) |
Thank you for your quick answer! I appreciate that you answer to such a
begginner like me.
>You created your own http client? Why don't you use the one coming with
>lwIP? (And yes, I'm too lazy to open that stackoverflow thing...)
Yes, I had to. All documentation which I found about the built in http
client was this:
https://www.nongnu.org/lwip/2_1_x/group__httpc.html
Based on this I could nicely download files from the server with this code:
ip_addr_t server_addr;
IP4_ADDR(&server_addr, 192, 168, 0, 119);
char domain_name[30] = "www.procontrol.hu";
domain_name[17] = '\0';
u16_t portnum = 80;
httpc_connection_t *conn_settings_try;
conn_settings_try->use_proxy = 0;
char url[100] = "/index.html";
char url[11] = '\0';
httpc_get_file(&server_addr, portnum, url, conn_settings_try,
HttpClientGetFileReceive, NULL,
NULL);
//httpc_get_file_dns(domain_name, portnum, url, conn_settings_try,
HttpClientGetFileReceive,
//NULL, NULL);
However I could not use the httpc_get_file_dns() function. I would be happy
if someone could help me to use the built in http client.
>Why do people always search for problems in other people's work? As I've
>written above, lwIP is perfectly capable of much faster connection setup
>than you even thought. This is not an lwIP problem but rather a problem
>of your setup (or whoever you got your setup from). And by setup I mean
>the OS port, CPU port, netif driver, etc.
Thank you for the tips. I have forgotten that there are communcation layers
even under lwip...
Regards,
Simon Kószó
--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html