W60X_Arduino: Client Class Reference

Arduino W60X

W60X_Arduino
Client Class Referenceabstract

Inherits Stream.

Inherited by WiFiClient.

Public Member Functions

virtual int connect (IPAddress ip, uint16_t port)=0
 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)=0
 This function is used to connect to the IP address and port specified in the constructor. More...
 
virtual size_t write (uint8_t)=0
 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)=0
 This function is used to write data to the server the client is connected to. More...
 
virtual int available ()=0
 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 ()=0
 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)=0
 Read the next byte received from the server the client is connected to (after the last call to read()). More...
 
virtual int peek ()=0
 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 void flush ()=0
 Discard any bytes that have been written to the client but not yet read. More...
 
virtual void stop ()=0
 This function is used to disconnect from the server. More...
 
virtual uint8_t connected ()=0
 Whether or not the client is connected. More...
 
virtual operator bool ()=0
 
- 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...
 

Additional Inherited Members

- 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)
 
- Protected Attributes inherited from Stream
unsigned long _timeout
 
unsigned long _startMillis
 

Member Function Documentation

◆ available()

virtual int Client::available ( )
pure virtual

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).

Parameters
[in]None
[out]None
Return values
Thenumber of bytes available
Note
available() inherits from the Stream utility class.

Implements Stream.

Implemented in WiFiClient.

◆ connect() [1/2]

virtual int Client::connect ( IPAddress  ip,
uint16_t  port 
)
pure virtual

This function is used to connect to the IP address and port specified in the constructor.

Parameters
[in]ipthe IP address that the client will connect to (array of 4 bytes)
[in]portthe port that the client will connect to (int)
[out]None
Return values
1the connection succeeds
0the connection failed
Note

Implemented in WiFiClient.

◆ connect() [2/2]

virtual int Client::connect ( const char *  host,
uint16_t  port 
)
pure virtual

This function is used to connect to the IP address and port specified in the constructor.

Parameters
[in]hostthe domain name the client will connect to (string, ex.:"arduino.cc")
[in]portthe port that the client will connect to (int)
[out]None
Return values
1the connection succeeds
0the connection failed
Note

Implemented in WiFiClient.

◆ connected()

virtual uint8_t Client::connected ( )
pure virtual

Whether or not the client is connected.

Parameters
[in]None
[out]None
Return values
1the client is connected
0the client is disconnected
Note
that a client is considered connected if the connection has been closed but there is still unread data.

Implemented in WiFiClient.

◆ flush()

virtual void Client::flush ( )
pure virtual

Discard any bytes that have been written to the client but not yet read.

Parameters
[in]None
[out]None
Returns
None
Note
flush() inherits from the Stream utility class.

Implemented in WiFiClient.

◆ peek()

virtual int Client::peek ( )
pure virtual

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().

Parameters
[in]None
[out]None
Return values
-1none is available
otherthe next byte or character
Note
This function inherited from the Stream class. See the Stream class main page for more information.

Implements Stream.

Implemented in WiFiClient.

◆ read() [1/2]

virtual int Client::read ( )
pure virtual

Read the next byte received from the server the client is connected to (after the last call to read()).

Parameters
[in]None
[out]None
Return values
-1none is available.
otherThe next character
Note
read() inherits from the Stream utility class

Implements Stream.

Implemented in WiFiClient.

◆ read() [2/2]

virtual int Client::read ( uint8_t *  buf,
size_t  size 
)
pure virtual

Read the next byte received from the server the client is connected to (after the last call to read()).

Parameters
[in]bufthe byte to read
[in]sizethe size of the buf
[out]None
Return values
-1none is available.
otherThe next byte
Note
read() inherits from the Stream utility class

Implemented in WiFiClient.

◆ stop()

virtual void Client::stop ( )
pure virtual

This function is used to disconnect from the server.

Parameters
[in]None
[out]None
Returns
None
Note

Implemented in WiFiClient.

◆ write() [1/2]

virtual size_t Client::write ( uint8_t  )
pure virtual

This function is used to write data to the server the client is connected to.

Parameters
[in]thechar to write
[out]None
Return values
thenumber of characters written. it is not necessary to read this value.
Note

Implements Print.

Implemented in WiFiClient.

◆ write() [2/2]

virtual size_t Client::write ( const uint8_t *  buf,
size_t  size 
)
pure virtual

This function is used to write data to the server the client is connected to.

Parameters
[in]bufthe byte to write
[in]sizethe size of the buf
[out]None
Return values
thenumber of characters written. it is not necessary to read this value.
Note

Reimplemented from Print.

Implemented in WiFiClient.

Generated by   doxygen 1.8.14