Support network protocols that require server to send data before client e.g. VNC [imported] #186
Labels
feature request
A request to make an enhancement (not a bug fix)
Library: Ethernet
The Ethernet Arduino library
This is Issue 186 moved from a Google Code project.
Added by 2010-01-15T02:09:24.000Z by follower@gmail.com.
Please review that bug for more context and additional comments, but update this bug.
Original labels: Type-Enhancement, Priority-Medium
Original description
What change would you like to see?
Add a '.connected()' method to 'Server' which returns connected clients without consideration for
whether they have data available (which '.available()' does).
Why?
At present it is not possible to implement a network protocol which requires the server to send
data when the client connects but before the client sends data. VNC is an example of such a
protocol. As is a telnet server which wished to send a banner on connection.
Would this cause any incompatibilities with previous versions? If so, how
can these be mitigated?
Adding this method with the attached patch shouldn't cause incompatibilities unless someone
has extended the Server class with a 'connected()' method themselves.
The implementation of the supplied patch is not ideal however as it simply duplicates most of the
code in 'available()'. Ideally one method should call the other with some flag that indicates a
check should be made for data available. Changing the implementation of 'available()' in this
manner would increase the possibility of accidental incompatibilities but should lead to a "more
maintainable" implementation.
The text was updated successfully, but these errors were encountered: