I'd like to propose the following, lemme know if you're OK with me trying it out:
define a bunch of negative numeric error codes for socket errors, use -1 as generic/unknown error
update the esp8266 network code to return the appropriate error code
in socketserver.c, when netrecv/netsend/netcreate return an error code enqueue an error callback on the socket or httpCRs object passing the error string corresponding to the code as argument (right now neither error callback takes any argument, so this should be backwards compatible)
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.
I'd like to propose the following, lemme know if you're OK with me trying it out:
Thoughts?