Arduino Function: WiFiClient.connect

Description

This function allows you to connect to the IP address and port specified in the constructor. The return value indicates success or failure. connect() also supports DNS lookups when using a domain name (ex:google.com).

Syntax

client.connect(ip, port)
client.connect(URL, port)

Parameters

  • ip: the IP address that the client will connect to (array of 4 bytes)
  • url: the domain name the client will connect to (string, ex.:"arduino.org")
  • port: the port that the client will connect to (int)

Returns

 True: connection succesfull. False: connection faiulure.


Based on the reference originally written by Arduino Community,  wiring.org.co and  arduino.cc