Syntax
class LTcpClient : public Client;
ContentsIndex
PreviousUpNext
LTcpClient Class
Members | Operators | Example
Syntax
class LTcpClient : public Client;
Description

LTcpClient Class 

LTcpClient is the base implementation of LWiFiClient and LGPRSClient. You should not use LTcpClient instances directly. Instead, declare instances of LWiFiClient or LGPRSClient and use them to connect TCP socket through Wi-Fi and GPRS.

Example
    LWiFi.begin();
    LWiFi.connect("open_network");
    LWiFiClient c;
    c.connect("www.website.com", 80);
    LWiFi.end();
Class Hierarchy
File

LTcpClient.h

Group
Methods
Method 
Description 
Queries if there are incoming data from server side and returns the number of byte available for read after connecting to a server. 
Connects to a TCP server. 
Connects to a TCP server. 
Queries if this client object has been connected to a TCP server. 
flush is not currrently supported. 
Constructs a LTcpClient object which can be used to connect to the remote TCP server. 
peek 
Queries the first unread byte sent from the connected server side. This byte is not considered as read; therefore this method will return the same byte until read() is called. 
read 
Reads the data sent from the server side and returns one single byte if there is no parameter given. If the buffer and buffer size are given, store the data in the buffer passed in. 
read 
Reads the data sent from the server side and returns one single byte if there is no parameter given. If the buffer and buffer size are given, store the data in the buffer passed in. 
stop 
Disconnects from the connected TCP server. 
Writes data to server after connected to one. 
Writes data to server after connected to one. 
Operators
Operator 
Description 
bool 
An LWiFiClient or LGPRSClient object will evaluate to true if it is connected