Streaming UDP API changes (Issue 439) #19

wants to merge 4 commits into


None yet

3 participants


Changes to the UDP class so that it derives from Stream. Also addition of an IPAddress class to make passing round IP addresses easier.

The "operator uint8_t*()" cast needs to be removed in the long run (it makes it possible for people to end up with pointers to the contents of IPAddress objects that no longer exist) but it's needed in the short-term to allow IPAddress objects to be passed to functions like Ethernet.begin(). I'll update Ethernet, Client and Server to use IPAddress when the DHCP code is added, and remove it then.

amcewen added some commits Jan 10, 2011
@amcewen amcewen Fix for issue 439. UDP API changed to derive from Stream. The old sen…
…dPacket and readPacket calls have been removed, and replaced with Stream-derived alternatives which provide more commonality with other communications classes and to allow both buffered and full-packet-at-a-time uses. Also includes the introduction of an IPAddress class to make passing them around easier (and require fewer pointers to be exposed)
@amcewen amcewen Merge remote branch 'upstream/master' into dhcp-dns a3c7a1b
@amcewen amcewen Added a method to read data into a char buffer so that character-base…
…d (rather than byte-based) operations don't require a cast. As requested by Tom Igoe. Part of the fix to issue 439.
@amcewen amcewen Fix for issue 62, adding DHCP support. New begin() method added to Et…
…hernetClass which takes just a MAC address and gets the rest of its configuration information via DHCP. Examples updated to use the IPAddress class and some have been changed to get their config via DHCP.

wow, this should make the eithernet shield 10x more useful. Thanks!


PS. is this still in dev. or is it ready to use/beta test?

It should be ready to use, and hopefully will be making it into the core in the next release or so. Let me know if you have any issues with it.

Arduino member

Applied: f43c091

@damellis damellis closed this Mar 26, 2011
@ricklon ricklon added a commit to ricklon/Arduino that referenced this pull request May 18, 2011
@ricklon ricklon Closes #19, Memory limit updated in boards.txt for Uno32. dff7b16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment