-
• #2
You can't write code that blocks waiting for input. It needs to use callbacks.
I'm not quite sure what you're trying to do, but this looks like it'd be an awful lot easier in JavaScript!
-
• #4
Personally I'd figure out which bit of the current module is slow (probably the masking) and implement just that part.
But if you did want to implement a WS module you'd be better off adding the functionality to
socketserver.c
as a new type of socket. -
• #6
Hi, @Gordon
I try you suggestion, result is here:
http://forum.espruino.com/conversations/302083/#comment13541177
Thanks!
ESP32 module, WIFI connected.
In C native code , I send datas to a server by a socket connection.
The server receives the data correctly, then it sends a response string "hello client" to ESP32.
I use waitForInput to detect response data, but it always return FASLE.
And, should I use the following function to receive data?