@Gordon I think we need a whole new thread that I would suggest titling:
"Architecture: WiFi generic object interface"
What that thread would cover would be the "spec" for the generic WiFi object that would be exposed to JS and then board implementations such as ESP8266 would then implement that spec.
In my mind, the "WiFi" spec would NOT own any API networking ... it would specifically own WiFi access ... functions that it might expose would be:
Scan and list the available access points
Connect to an access point as a station
Disconnect from an access point
Become an access point
List the the stations connected to me when I am access point
Drop a station connected to me when I am an access point
All of these are "WiFi" related and are present to initialize the network arena but aren't network programming so I would keep separate from socketserver functions.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
@Gordon I think we need a whole new thread that I would suggest titling:
"Architecture: WiFi generic object interface"
What that thread would cover would be the "spec" for the generic WiFi object that would be exposed to JS and then board implementations such as ESP8266 would then implement that spec.
In my mind, the "WiFi" spec would NOT own any API networking ... it would specifically own WiFi access ... functions that it might expose would be:
All of these are "WiFi" related and are present to initialize the network arena but aren't network programming so I would keep separate from socketserver functions.
(opinions were rife in this post :-)