Skip to content

Support network protocols that require server to send data before client e.g. VNC [imported] #186

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

Open
cmaglie opened this issue Nov 15, 2012 · 0 comments
Assignees
Labels
feature request A request to make an enhancement (not a bug fix) Library: Ethernet The Ethernet Arduino library

Comments

@cmaglie
Copy link
Member

cmaglie commented Nov 15, 2012

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.

@ffissore ffissore added the New label Feb 27, 2014
tbowmo pushed a commit to tbowmo/Arduino that referenced this issue Jul 14, 2016
@per1234 per1234 added the feature request A request to make an enhancement (not a bug fix) label Jul 1, 2017
@per1234 per1234 added the Library: Ethernet The Ethernet Arduino library label Sep 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request A request to make an enhancement (not a bug fix) Library: Ethernet The Ethernet Arduino library
Projects
None yet
Development

No branches or pull requests

4 participants