Replies: 9 comments 4 replies
-
is this issue still open? i was thinking something elaborated... but until not so realtime tough, i realized this is already done in AdvancedChatServer example with WiFiServer.accept() managing our own external array of connected clients.... though i dont know what event to listen when a client leaves, other than polling :/ maybe using client.status() or query some other way ... we talked this before but i dont remember, there was a situation when client disconnected but there are still data unread on his buffer.... maybe everytime we know there is no more data we should also check if client is still connected to remove him from array if not the another elaborated solution could be make the Server.atCwlif() return an iterable object that retuns a Client on each loop, until null.... or make it directly return an array of clients, or sockets (i am worried about memory comsumption though) or make it work similar to WiFi.scanNetworks(), passing an empty WiFiClient array to fill in, making it reentrant (what returns scanNetworks()?)
p.s: i want to thank your patience with me... i am not a programmer, i am totally autodidact about programming.... sometimes i found things very hard to understand and got a little anxious, that was the case with |
Beta Was this translation helpful? Give feedback.
-
stations which joined to SoftAP, not clients connected to a TCP server. |
Beta Was this translation helpful? Give feedback.
-
... so ports and sockets and buffers are meaningless.... what about something like this?...
|
Beta Was this translation helpful? Give feedback.
-
yes something like that. |
Beta Was this translation helpful? Give feedback.
-
i was thinking a little.... i am looking the code, specially from in documentation you say we can pass an optional parameter
could there be some way to autodetect the lenght or get it earlier, that is not necessary to pass the lenght for ease, to prevent overflows and not to waste too much ram at same time? maybe a 2 pass commands? sorry for replying here, maybe this is a matter for a new issue but as i found with occasion of implementing this new command... anyway i think you flaw badly with command documentation, in some time i will check the source (collect public function signatures from .h files) and contribute with a more detailed api specification |
Beta Was this translation helpful? Give feedback.
-
in C and C++ it is not possible to determine in the function the length of a basic array passed to the function. so the length must be always specified as a separate parameter. scanNetwork in your snippet without the second parameter would corrupt content of RAM. (so I guess it would be better to provide two functions, one without parameters as required by Arduino API and an optional version with two parameters) |
Beta Was this translation helpful? Give feedback.
-
esp8266 and esp32 Arduino have the max count of stations of SoftAP is very low. it is max 8. |
Beta Was this translation helpful? Give feedback.
-
this could be the example:
|
Beta Was this translation helpful? Give feedback.
-
yes it works twice. user can decide if calls the function with a fixed array or first requests the size and the AT command will be processed twice. but yes the fixed size array is the better way and should be shown as example with WIFIESPAT_MAX_STATIONS_COUNT provided by the library. Notes:
|
Beta Was this translation helpful? Give feedback.
-
wrap command AT+CWLIF
Beta Was this translation helpful? Give feedback.
All reactions