close

xod/w5500/close

Closes an open TCP connection
close
@/close
Closes an open TCP connection
SOCKxod/net/socket
The socket
CLSpulse
Close the connection
close
DONE
SOCK
CLS
DONEpulse
Pulses when the connection is closed

C++ implementation

{{#global}}
#include <SPI.h>
#include <Ethernet2.h>
{{/global}}

struct State {
};

{{ GENERATED_CODE }}

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

    auto client = EthernetClient(getValue<input_SOCK>(ctx));
    client.stop();
    emitValue<output_DONE>(ctx, 1);
}