Closed GoogleCodeExporter closed 9 years ago
To be more consistent with other sockets designs, shouldn't this be called
getSocketHandle?
Thanks,
Gene
Original comment by Nightrad...@gmail.com
on 25 Apr 2012 at 5:36
Yes, the name is not important.
Thanks.
Alberto
Original comment by Alberto....@gmail.com
on 25 Apr 2012 at 10:45
I don't think it makes sense to add a function that returns the socket number,
which is an implementation detail. But adding an operator==(), so you could
compare a previous client instance (from a previous Server.available()) to a
new one could make sense.
Original comment by dmel...@gmail.com
on 9 May 2012 at 12:58
Yes, the important things is have a method for differentiate different client.
Thakhs.
Alberto
Original comment by Alberto....@gmail.com
on 9 May 2012 at 8:10
if you need to do any low level sock code them you need the socket number, not
that the average Arduino user is going to be doing any/alot of sock code, but
some may.
Gene
Original comment by Nightrad...@gmail.com
on 18 May 2012 at 5:49
Most people don't write socket code, but most use ethernet library for receive
data, and understand if we are receiving or sending data from a pre opened
connection or from a new one is important for protocol that are not one shot,
like http 1.0, but require multiple send / receive sequences like telnet server.
Alberto
Original comment by Alberto....@gmail.com
on 22 May 2012 at 12:21
I agree with Alberto, the main use case here is just telling if two clients are
the same. Again, an operator==() seems like the right way to handle that.
Adrian, do you want to take a look at this?
Original comment by dmel...@gmail.com
on 23 May 2012 at 2:52
Hi, The other use case that I have a need for as well is to not just
differentiate whether a client is different, but be able to track the client to
be able to keep state information such as whether they have authenticated via
their telnet connection etc.
From that point of view the socket number would be useful as it can then be
used as an index for an array etc.
Can this please be taken into consideration when implementing the final
solution?
Thanks!
Original comment by alwa...@gmail.com
on 2 Jun 2012 at 3:09
To clarify, the expectation in that use case would be that there could well be
more than 1 client connected at a time (obviously up to 4).
Original comment by alwa...@gmail.com
on 2 Jun 2012 at 3:11
Hello,
I am trying to create a class that inherits from EthernetClient. I need to
access the _sock and and _srcport variables. I have found that these variables
are necessary when working with websockets. Perhaps you can make these
variables protected instead of private, by making the following modification in
the EtherClient.h file. This would allow people to inherit from the
EthernetClient and create the the additional functions needed to access these
variables.
protected:
static uint16_t _srcport;
uint8_t _sock;
Thanks,
-ren
Original comment by rena...@yahoo.com
on 3 Oct 2012 at 5:06
Add pull request:
https://github.com/arduino/Arduino/pull/2844
Original comment by Alberto....@gmail.com
on 30 Mar 2015 at 8:40
Solved by merging
https://github.com/arduino/Arduino/commit/c5f0815f272b88e75e5a99ce98a838d9543ab5
cd
Original comment by c.mag...@arduino.cc
on 15 Jul 2015 at 3:46
Original issue reported on code.google.com by
Alberto....@gmail.com
on 20 Apr 2012 at 11:58