Skip to content

UDP code is hard-coded to use socket 0 [imported] #436

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
cmaglie opened this issue Nov 15, 2012 · 0 comments
Closed

UDP code is hard-coded to use socket 0 [imported] #436

cmaglie opened this issue Nov 15, 2012 · 0 comments

Comments

@cmaglie
Copy link
Member

cmaglie commented Nov 15, 2012

This is Issue 436 moved from a Google Code project.
Added by 2010-12-27T19:10:20.000Z by adrian.m...@gmail.com.
Please review that bug for more context and additional comments, but update this bug.
Closed (Fixed).

Original labels: Type-Defect, Priority-Medium, Component-Core, Milestone-0023

Original description

In Arduino 0019 and above (I think that's when the Udp code was added, it's definitely in 0021 and 0022), libraries/Ethernet/Udp.cpp contains the following line:

_sock = 0; //TODO: should not be hardcoded

This means that it's not possible to have more than one UDP "connection" (for want of a better word) at once, and would also cause problems if the sketch used both UDP and the Client class if the Client.connect was called before Udp.begin.

I've got a patch ready that fixes this, which I'll submit a pull request on github for once I've worked out how to do that

@cmaglie cmaglie closed this as completed Nov 15, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant