Syntax
virtual int connect(
    const char * host, 
    uint16_t port
);
ContentsIndex
PreviousUpNext
LTcpClient::connect Method (char *, uint16_t)
LTcpClient Class | Example
Syntax
virtual int connect(
    const char * host, 
    uint16_t port
);
Description

Connects to a TCP server.

Parameters
Parameters 
Description 
uint16_t port 
TCP port to be connected
 
IPAddress 
String, e.g. "172.21.84.11", that denotes server address
 
Returns

1 if connected, 0 otherwise. 

 

Example
    client.connect("www.somewebsite.com", 80);  // client is an instance of LWiFiClient or LGPRSClient.
File

LTcpClient.h

Class