• Am working on the port of Espruino to an ESP8266 and have found something I am not understanding. If I form a TCP socket connection to a partner and the invoke the "end()" method on the socket I am finding that the request to disconnect doesn't actually happen until after I try and transmit something further. For example:

    var n = require("net");
    var s = n.connect({
          host: "192.168.4.2",
          port: 25867
    }, function(req) {
          print("Connected!: " + JSON.stringify(req));
          req.end();
    });
    

    doesn't cause the socket connection issued from the ESP8266 to be disconnected until I try the following:

    var n = require("net");
    var s = n.connect({
          host: "192.168.4.2",
          port: 25867
    }, function(req) {
          print("Connected!: " + JSON.stringify(req));
          req.end();
          req.write("We should be already disconnected");
    });
    

    Unfortunately, I don't have a real Espruino board to test against so I can't tell if this is how it works on the real Espruino or whether I have broken something in the ESP8266 implementation.

About

Avatar for Kolban @Kolban started