@allObjects
my.socket:
my.socket
={ "type": 0, "#onconnect": function (e) { ... }, "opt": { "host": "example.com", "port": 1234 }, "sckt": 18, "conn": true, "#ondata": function (e) { ... }, "#onerror": function () { ... }, "#onclose": function () { ... }, "#onend": function () { ... }, "dSnd": "", "dRcv": undefined }
my.socket.write("hehe") actually sends "hehe" to the server.
my.socket.write("hehe")
my.socket.close():
my.socket.close()
>my.socket.close() Uncaught Error: Function "close" not found! at line 1 col 11 my.socket.close() ^
But, Socket.end() seems to work as expected, with an acceptable delay.
Socket.end()
@ceremcem started
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.
@allObjects
my.socket
:my.socket.write("hehe")
actually sends "hehe" to the server.my.socket.close()
:But,
Socket.end()
seems to work as expected, with an acceptable delay.