virtual int connect( IPAddress ip, uint16_t port );
virtual int connect( IPAddress ip, uint16_t port );
Connects to a TCP server.
|
Parameters |
Description |
|
uint16_t port |
TCP port to be connected |
|
IPAddress |
IPAddress object, e.g. IPAddress server (172, 21, 84, 11), that denotes server address |
1 if connected, 0 otherwise.
IPAddress server("127.0.0.1");
client.connect(server, 80); // client is an instance of LWiFiClient or LGPRSClient.LTcpClient.h