itsanjan / arduino

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

accept() function missing from the new Server base class. #616

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I'm guessing this is because we can't return a Client from it, and we're trying 
to avoid pointers or references.  Maybe we can return a ClientProxy class or 
something, which also inherits from Client and basically wraps a pointer to a 
EthernetClient (or other subclass of Client)?  Or even make the Client base 
class itself also able to act as a proxy?

What do you think, Adrian?  Want to bring it up on the developers list?

Original issue reported on code.google.com by dmel...@gmail.com on 31 Aug 2011 at 7:11

GoogleCodeExporter commented 9 years ago
Well, the main reason that accept is missing from the Server base class is 
because it seemed to be an internal implementation detail, and so I didn't 
think it should be mandatory given that users of the API will never call it 
themselves.

Thinking about it more, I guess you mean that available() isn't in the API, and 
you're right, it's because there's no easy way to set the return type.

I'll see if anyone has got any ideas on the developers list, and also see if we 
incorporate a fix for issue #186 as the same time

Original comment by adrian.m...@gmail.com on 31 Aug 2011 at 9:23