arduino client disconnect code example
Example: arduino client disconnect
WiFiClient client;
WiFi.begin(ssid, pass);
delay(4000); //Allow connection to be established
client.connect(IP, port_number); //Connect to server
client.stop() //Disconnect