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