W60X_Arduino: WiFiClient Class Reference

Arduino W60X

W60X_Arduino

Inherits Client, and SList< WiFiClient >.

Public Member Functions

 WiFiClient ()
 This function is constructor, it's used to creates a client that can connect to to a specified internet IP address and port as defined in client.connect(). More...
 
 WiFiClient (const WiFiClient &)
 
WiFiClientoperator= (const WiFiClient &)
 
virtual ~WiFiClient ()
 This function is deconstructor, it's used to release WiFiClient class. More...
 
uint8_t status ()
 return tcp status of WiFiClient. More...
 
virtual int connect (IPAddress ip, uint16_t port)
 This function is used to connect to the IP address and port specified in the constructor. More...
 
virtual int connect (const char *host, uint16_t port)
 This function is used to connect to the IP address and port specified in the constructor. More...
 
virtual int connect (const String host, uint16_t port)
 
virtual size_t write (uint8_t)
 This function is used to write data to the server the client is connected to. More...
 
virtual size_t write (const uint8_t *buf, size_t size)
 This function is used to write data to the server the client is connected to. More...
 
virtual size_t write_P (PGM_P buf, size_t size)
 
size_t write (Stream &stream)
 
size_t write (Stream &stream, size_t unitSize) __attribute__((deprecated))
 
virtual int available ()
 Returns the number of bytes available for reading (That is, the amount of data that has been written to the client by the server it is connected to). More...
 
virtual int read ()
 Read the next byte received from the server the client is connected to (after the last call to read()). More...
 
virtual int read (uint8_t *buf, size_t size)
 Read the next byte received from the server the client is connected to (after the last call to read()). More...
 
virtual int peek ()
 Read a byte from the file without advancing to the next one.
That is, successive calls to peek() will return the same value, as will the next call to read(). More...
 
virtual size_t peekBytes (uint8_t *buffer, size_t length)
 
size_t peekBytes (char *buffer, size_t length)
 
virtual void flush ()
 Discard any bytes that have been written to the client but not yet read. More...
 
virtual void stop ()
 This function is used to disconnect from the server. More...
 
virtual uint8_t connected ()
 Whether or not the client is connected. More...
 
virtual operator bool ()
 
IPAddress remoteIP ()
 This function is used to gets the IP address of the remote connection. More...
 
uint16_t remotePort ()
 This function is used to gets the port of the remote connection. More...
 
IPAddress localIP ()
 This function is used to gets the IP address of the local tcp connection. More...
 
uint16_t localPort ()
 This function is used to gets the port of the local tcp connection. More...
 
bool getNoDelay ()
 This function is used to get whether no delay of the tcp connection. More...
 
void setNoDelay (bool nodelay)
 This function is used to set no delay for the tcp connection. More...
 
size_t availableForWrite ()
 This function is used to get the length that can be written. More...
 
void keepAlive (uint16_t idle_sec=TCP_DEFAULT_KEEPALIVE_IDLE_SEC, uint16_t intv_sec=TCP_DEFAULT_KEEPALIVE_INTERVAL_SEC, uint8_t count=TCP_DEFAULT_KEEPALIVE_COUNT)
 This function is used to set keep alive. More...
 
bool isKeepAliveEnabled () const
 This function is used to get whether enable keep alive. More...
 
uint16_t getKeepAliveIdle () const
 This function is used to get idle time interval. More...
 
uint16_t getKeepAliveInterval () const
 This function is used to get keep alive time interval. More...
 
uint8_t getKeepAliveCount () const
 This function is used to get keep alive count. More...
 
void disableKeepAlive ()
 This function is used to set disable keep alive. More...
 
virtual size_t write (uint8_t)=0
 This pure virtual function is used to define the operation that writes binary data. More...
 
virtual size_t write (const uint8_t *buffer, size_t size)
 This function is used to write buffer to the interface defined by the object. More...
 
size_t write (const char *str)
 This function is used to write buffer to the interface defined by the object. More...
 
size_t write (const char *buffer, size_t size)
 This function is used to write buffer to the interface defined by the object. More...
 
- Public Member Functions inherited from Stream
void setTimeout (unsigned long timeout)
 setTimeout() sets the maximum milliseconds to wait for stream data, it defaults to 1000 milliseconds. This function is part of the Stream class, and is called by any class that inherits from it (Wire, Serial, etc). See the Stream class main page for more information. More...
 
bool find (const char *target)
 find() reads data from the stream until the target string of given length is found The function returns true if target string is found, false if timed out. More...
 
bool find (uint8_t *target)
 find() reads data from the stream until the target string of given length is found The function returns true if target string is found, false if timed out. More...
 
bool find (const char *target, size_t length)
 find() reads data from the stream until the target string of given length is found The function returns true if target string is found, false if timed out. More...
 
bool find (const uint8_t *target, size_t length)
 find() reads data from the stream until the target string of given length is found The function returns true if target string is found, false if timed out. More...
 
bool find (char target)
 find() reads data from the stream until the target string of given length is found The function returns true if target string is found, false if timed out. More...
 
bool findUntil (const char *target, const char *terminator)
 findUntil() reads data from the stream until the target string of given length or terminator string is found. More...
 
bool findUntil (const uint8_t *target, const char *terminator)
 findUntil() reads data from the stream until the target string of given length or terminator string is found. More...
 
bool findUntil (const char *target, size_t targetLen, const char *terminate, size_t termLen)
 findUntil() reads data from the stream until the target string of given length or terminator string is found. More...
 
bool findUntil (const uint8_t *target, size_t targetLen, const char *terminate, size_t termLen)
 findUntil() reads data from the stream until the target string of given length or terminator string is found. More...
 
long parseInt ()
 parseInt() returns the first valid (long) integer number from the serial buffer. Characters that are not integers (or the minus sign) are skipped. More...
 
float parseFloat ()
 parseFloat() returns the first valid floating point number from the current position. Initial characters that are not digits (or the minus sign) are skipped. parseFloat() is terminated by the first character that is not a floating point number. More...
 
virtual size_t readBytes (char *buffer, size_t length)
 readBytes() read characters from a stream into a buffer. The function terminates if the determined length has been read, or it times out (see setTimeout()). More...
 
virtual size_t readBytes (uint8_t *buffer, size_t length)
 readBytes() read characters from a stream into a buffer. The function terminates if the determined length has been read, or it times out (see setTimeout()). More...
 
size_t readBytesUntil (char terminator, char *buffer, size_t length)
 readBytesUntil() reads characters from a stream into a buffer. The function terminates if the terminator character is detected, the determined length has been read, or it times out (see setTimeout()). More...
 
size_t readBytesUntil (char terminator, uint8_t *buffer, size_t length)
 readBytesUntil() reads characters from a stream into a buffer. The function terminates if the terminator character is detected, the determined length has been read, or it times out (see setTimeout()). More...
 
String readString ()
 readString() reads characters from a stream into a string. The function terminates if it times out (see setTimeout()). More...
 
String readStringUntil (char terminator)
 readStringUntil() reads characters from a stream into a string. The function terminates if the terminator character is detected or it times out (see setTimeout()). More...
 
- Public Member Functions inherited from Print
int getWriteError ()
 This function is used to get write error number. More...
 
void clearWriteError ()
 This function is used to clear write error number. More...
 
size_t write (const char *str)
 This function is used to write buffer to the interface defined by the object. More...
 
size_t write (const char *buffer, size_t size)
 This function is used to write buffer to the interface defined by the object. More...
 
size_t print (const String &)
 This function is used to print buffer to the interface defined by the object. More...
 
size_t print (const char [])
 This function is used to print buffer to the interface defined by the object. More...
 
size_t print (char)
 This function is used to print buffer to the interface defined by the object. More...
 
size_t print (unsigned char, int=DEC)
 This function is used to print target to the interface defined by the object. More...
 
size_t print (int, int=DEC)
 This function is used to print target to the interface defined by the object. More...
 
size_t print (unsigned int, int=DEC)
 This function is used to print target to the interface defined by the object. More...
 
size_t print (long, int=DEC)
 This function is used to print target to the interface defined by the object. More...
 
size_t print (unsigned long, int=DEC)
 This function is used to print target to the interface defined by the object. More...
 
size_t print (double, int=BIN)
 This function is used to print target to the interface defined by the object. More...
 
size_t print (const Printable &)
 This function is used to print target to the interface defined by the object. More...
 
size_t println (void)
 This function is used to print target to the interface defined by the object with carriage ret ('') and new line ('
'). More...
 
size_t println (const String &s)
 This function is used to print target to the interface defined by the object with carriage ret ('') and new line ('
'). More...
 
size_t println (const char [])
 This function is used to print target to the interface defined by the object with carriage ret ('') and new line ('
'). More...
 
size_t println (char)
 This function is used to print target to the interface defined by the object with carriage ret ('') and new line ('
'). More...
 
size_t println (unsigned char, int=DEC)
 This function is used to print target to the interface defined by the object with carriage ret ('') and new line ('
'). More...
 
size_t println (int, int=DEC)
 This function is used to print target to the interface defined by the object with carriage ret ('') and new line ('
'). More...
 
size_t println (unsigned int, int=DEC)
 This function is used to print target to the interface defined by the object with carriage ret ('') and new line ('
'). More...
 
size_t println (long, int=DEC)
 This function is used to print target to the interface defined by the object with carriage ret ('') and new line ('
'). More...
 
size_t println (unsigned long, int=DEC)
 This function is used to print target to the interface defined by the object with carriage ret ('') and new line ('
'). More...
 
size_t println (double, int=BIN)
 This function is used to print target to the interface defined by the object with carriage ret ('') and new line ('
'). More...
 
size_t println (const Printable &)
 This function is used to print target to the interface defined by the object with carriage ret ('') and new line ('
'). More...
 

Static Public Member Functions

static void setLocalPortStart (uint16_t port)
 This function is used to set local port number. More...
 
static void stopAll ()
 This function is used to stop all WiFiClient session. More...
 
static void stopAllExcept (WiFiClient *c)
 This function is used to stop all WiFiClient session without exC. More...
 

Protected Member Functions

 WiFiClient (ClientContext *client)
 
int8_t _connected (void *tpcb, int8_t err)
 
void _err (int8_t err)
 
- Protected Member Functions inherited from Stream
int timedRead ()
 
int timedPeek ()
 
int peekNextDigit ()
 
long parseInt (char skipChar)
 
float parseFloat (char skipChar)
 
- Protected Member Functions inherited from Print
void setWriteError (int err=1)
 

Static Protected Member Functions

static int8_t _s_connected (void *arg, void *tpcb, int8_t err)
 
static void _s_err (void *arg, int8_t err)
 
- Static Protected Member Functions inherited from SList< WiFiClient >
static void _add (WiFiClient *self)
 
static void _remove (WiFiClient *self)
 

Protected Attributes

ClientContext_client
 
- Protected Attributes inherited from Stream
unsigned long _timeout
 
unsigned long _startMillis
 
- Protected Attributes inherited from SList< WiFiClient >
WiFiClient_next
 

Static Protected Attributes

static uint16_t _localPort = 0
 
- Static Protected Attributes inherited from SList< WiFiClient >
static WiFiClient_s_first
 

Friends

class WiFiServer
 

Member Function Documentation

◆ write() [1/4]

size_t Print::write

This function is used to write buffer to the interface defined by the object.

Parameters
[in]bufferSpecify the buffer.
[in]sizeSpecify the size.
Returns
The length of write successfully.
Note
Parameters
[in]bufferSpecify the buffer.
[in]sizeSpecify the size.
Returns
The length of write successfully (1 byte).
Note

◆ write() [2/4]

size_t Print::write
inline

This function is used to write buffer to the interface defined by the object.

Parameters
[in]strSpecify the buffer of string.
Returns
The length of write successfully.
Note

◆ write() [3/4]

size_t Print::write
inline

This function is used to write buffer to the interface defined by the object.

Parameters
[in]bufferSpecify the buffer of string.
[in]sizeSpecify the size.
Returns
The length of write successfully.
Note

◆ write() [4/4]

virtual size_t Print::write

This pure virtual function is used to define the operation that writes binary data.

Parameters
[in]vala value to send as a single byte
Returns
The length of write successfully (1 byte).
Note
Generated by   doxygen 1.8.14