Author Topic: Raw LwIP, TCP streaming / Sending large file  (Read 634 times)

0 Members and 1 Guest are viewing this topic.

Offline stdTopic starter

  • Contributor
  • Posts: 15
  • Country: 00
Raw LwIP, TCP streaming / Sending large file
« on: June 10, 2024, 08:24:48 pm »
Hello All!
There is LwIP without RTOS, "Raw" model, TCP.
Everything works fine with small TCP packets/answers.

----- Question -----

How to write LwIP TCP streaming code, that transfers hundreds of Kb or Mb over TCP?
How to optimally and timely fill the internal output buffer of LwIP?
Maybe someone can remember example code...
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4305
  • Country: us
Re: Raw LwIP, TCP streaming / Sending large file
« Reply #1 on: June 12, 2024, 08:56:49 am »
Quote
How to write LwIP TCP streaming code, that transfers hundreds of Kb or Mb over TCP?
Are you actually having problems, or are you just worried?
TCP doesn't really NEED to "fill the output buffers"; the network link is usually going to be the slow part.

I've always been a little sad that modern TCP implementations focus almost entirely on avoiding congestion in the network.  Originally it was assumed that the source and destinations could also be bottlenecks, and things like the window and the ACK strategy were supposed to reflect the host resources.  (Now, they're manipulated (eg "slow start") to prevent the host from congesting the net.)
 

Offline glenenglish

  • Frequent Contributor
  • **
  • Posts: 451
  • Country: au
  • RF engineer. AI6UM / VK1XX . Aviation pilot. MTBr
Re: Raw LwIP, TCP streaming / Sending large file
« Reply #2 on: June 13, 2024, 09:15:35 am »
the thing is, if you want the device to do anything else, it will be very awkward and messy dealing with all the asynchronous IO
so just use FreeRTOS+TCP.   

I have NFI why people persist with LWIP , that's like 1980s stuff for 4 bit microcontrollers.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf