is helpful for me, and for many people will and would be also, everytime the lib gets updated i have to patch it manually
i understand your argument about overwriting a link object with still unread data could lead to data loss and break sync
but C and C++ language philosophy is about give all tools, flexibility and freedom to programmers to do anything we want with the system at any level (hardware level, low level, user level, etc), together with the most complete documentation possible, so we could develop whatever tool we want/need, and if we commit a mistake we could assume our responsibility, fix it, learn about it, avoid mistakes in the future, write better programs, and grow as a developer
think in commands like memcpy() that don't check for cstring terminators '\0', it still exists and can be used to greatly improve some things, but warns strongly about buffer overflows... if memcpy() wouldn't exist because of buffer overflow risks, a lot of great things couldn't be done also
and about data loss, it could be just prevented by checking old client before overwriting new
WiFiClient newClient = server.accept();
if ( newClient )
{
for ( byte i=0; i < MAX_CLIENTS; ++i )
{
if ( !clients[i] )
{
// ...
// check if old client has still unread data before replacing it
// anyway is already disconnected so it won't send any more data
if ( clients[i].available() )
consumeRemainingDataSomeWay(clients[i]);
clients[i] = newClient;
break;
}
}
}
the unlikely data loss risk done by uncareful programmers doesn't worth all the benefits we will gain with getLinkId(), if done in right way with the correct documentation... the use we give to the library is up to us, you will give more usefulness to the library and freedom to us
please reconsider, document the risks and re enable it
as requested in #5 ...
is helpful for me, and for many people will and would be also, everytime the lib gets updated i have to patch it manually
i understand your argument about overwriting a link object with still unread data could lead to data loss and break sync
but C and C++ language philosophy is about give all tools, flexibility and freedom to programmers to do anything we want with the system at any level (hardware level, low level, user level, etc), together with the most complete documentation possible, so we could develop whatever tool we want/need, and if we commit a mistake we could assume our responsibility, fix it, learn about it, avoid mistakes in the future, write better programs, and grow as a developer
think in commands like memcpy() that don't check for cstring terminators '\0', it still exists and can be used to greatly improve some things, but warns strongly about buffer overflows... if memcpy() wouldn't exist because of buffer overflow risks, a lot of great things couldn't be done also
and about data loss, it could be just prevented by checking old client before overwriting new
the unlikely data loss risk done by uncareful programmers doesn't worth all the benefits we will gain with getLinkId(), if done in right way with the correct documentation... the use we give to the library is up to us, you will give more usefulness to the library and freedom to us
please reconsider, document the risks and re enable it