close

xod-dev/esp8266/close

Closes an open TCP connection
close
@/close
Closes an open TCP connection
INET@/esp8266-inet
An internet connection
SOCKxod/net/socket
A socket
CLSpulse
Close the connection
close
INET
SOCK
CLS
INET'
DONE
DONEpulse
Pulses when the connection is closed
INET'@/esp8266-inet
An internet connection
To use the node in your project you should have the xod-dev/esp8266 library installed. Use the “File → Add Library” menu item in XOD IDE if you don’t have it yet. See Using libraries for more info.

C++ implementation

#pragma XOD evaluate_on_pin disable
#pragma XOD evaluate_on_pin enable input_CLS

node {
    void evaluate(Context ctx) {
        if (!isInputDirty<input_CLS>(ctx))
            return;

        auto inet = getValue<input_INET>(ctx);
        inet.wifi->releaseTCP();
        emitValue<output_DONE>(ctx, 1);
        emitValue<output_INETU0027>(ctx, inet);
    }
}