Boo0ns / arduino

Automatically exported from code.google.com/p/arduino
0 stars 0 forks source link

Add a buffered API to UDP #439

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What change would like to see?
Add an additional API to UdpClass to allow packets to be sent and received in 
stages.

Why?
Outgoing DHCP packets are around 0.5KB in size, which is a fair chunk of RAM to 
devote at once to building up or receiving, and having to receive a packet all 
in one go is tricky to do without using malloc if the packets aren't of a fixed 
size.

A buffered API would let sketches build up outgoing packets in a number of 
calls, buffering the packet in the WizNet chip rather than in the ATmega.  
There is also scope for making the API more like the Stream API that most other 
communication to/from an Arduino uses.

Would this cause any incompatibilities with previous versions?  If so, how
can these be mitigated?
It shouldn't cause any incompatibilities with previous versions.

See also the discussion on the Developers' mailing list under the title "UDP 
API changes/additions (spinning that out from the DHCP/DNS discussion)"

Original issue reported on code.google.com by adrian.m...@gmail.com on 29 Dec 2010 at 2:44

GoogleCodeExporter commented 9 years ago

Original comment by dmel...@gmail.com on 8 Jan 2011 at 7:14

GoogleCodeExporter commented 9 years ago
Issue 377 has been merged into this issue.

Original comment by dmel...@gmail.com on 8 Jan 2011 at 7:15

GoogleCodeExporter commented 9 years ago
https://github.com/arduino/Arduino/commit/f43c0918ff9c1d76b1163652e9db664a5b42cc
d3

Original comment by dmel...@gmail.com on 26 Mar 2011 at 5:46