Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
ecab85d
API documentation
BenjaminDannegard Nov 26, 2024
12a02c9
Api docs
BenjaminDannegard Nov 26, 2024
45de986
Added API tags
BenjaminDannegard Nov 27, 2024
c116b89
GPT fix
BenjaminDannegard Nov 27, 2024
38503fe
Update
BenjaminDannegard Nov 27, 2024
38d6751
Update
BenjaminDannegard Nov 27, 2024
96df3e6
Updated API docs
BenjaminDannegard Nov 27, 2024
17f2913
Merge branch 'arduino:main' into benjamindannegard/api-documentation
BenjaminDannegard Nov 27, 2024
003c19d
Updated API
BenjaminDannegard Nov 27, 2024
c74ed4d
Add API docs workflow
sebromero Nov 27, 2024
c8716e0
api docs update
BenjaminDannegard Nov 27, 2024
ff3171e
Added more documentation
BenjaminDannegard Dec 2, 2024
ae58089
More api documentation
BenjaminDannegard Dec 3, 2024
fb14228
Fixed wifi.h api docs
BenjaminDannegard Dec 3, 2024
6a4093e
Finished API docs
BenjaminDannegard Dec 3, 2024
c0a276e
Merge pull request #1 from BenjaminDannegard/docs
BenjaminDannegard Dec 3, 2024
70bf179
First api.h draft
BenjaminDannegard Dec 4, 2024
6b8ebbb
Fixed for formating
BenjaminDannegard Dec 9, 2024
be2e2fb
Fixed api docs file
BenjaminDannegard Dec 9, 2024
5fb1ea3
Merge pull request #2 from BenjaminDannegard/benjamindannegard/api-do…
BenjaminDannegard Dec 10, 2024
20a2010
Update documentation
actions-user Dec 10, 2024
1399224
Removed unused tags
BenjaminDannegard Dec 13, 2024
a382728
Fixed formatting
BenjaminDannegard Dec 13, 2024
af1a452
Merge branch 'main' into main
BenjaminDannegard Feb 3, 2025
a994343
Merge branch 'main' into main
BenjaminDannegard Feb 13, 2025
1ac8280
Merge branch 'arduino:main' into main
BenjaminDannegard Feb 27, 2025
375fef3
Removed workflow
BenjaminDannegard Feb 27, 2025
f2d11bf
Removed duplicate functions
BenjaminDannegard Feb 27, 2025
4a741b7
Revert "Removed duplicate functions"
BenjaminDannegard Feb 27, 2025
af03bb1
Removed duplicate functions
BenjaminDannegard Feb 27, 2025
b7a620a
Merge branch 'main' into main
BenjaminDannegard Mar 3, 2025
0ab369b
Merge branch 'main' into main
sebromero Mar 13, 2025
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update
  • Loading branch information
BenjaminDannegard committed Nov 27, 2024
commit 38503fe0da9be9f1d62ff6cfd46913b02a37c400
46 changes: 21 additions & 25 deletions libraries/WiFiS3/src/WiFiClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,20 +123,6 @@ class WiFiClient : public Client {
*/
virtual int read();

/**
* @brief Reads multiple bytes of data from the server into a buffer.
*
* This function retrieves data from the server's receive buffer and stores it
* into the provided array. It attempts to read up to the specified number of
* bytes (`size`). The function stops reading if no more data is available or
* if an error occurs.
*
* @param[out] buf Pointer to the buffer where the data will be stored.
* @param[in] size Maximum number of bytes to read.
* @return The number of bytes successfully read into the buffer.
* Returns `0` if no data is available or if the socket is invalid.
*/

/**
* @brief Reads multiple bytes of data from the server into a buffer.
*
Expand All @@ -151,27 +137,33 @@ class WiFiClient : public Client {
* Returns `0` if no data is available or if the socket is invalid.
*/
virtual int read(uint8_t *buf, size_t size);

/**
* @brief Peeks at the next byte of incoming data without removing it from the internal buffer.
*
* @return The next byte as an `int` (0–255). Returns `-1` if no data is available
* or if the socket is invalid.
*/
virtual int peek();

/**
* @brief Clears any buffered outgoing data that has not been sent to the connected client.
* @brief Flushes the write buffer of the client.
*
* This function ensures that any data buffered for transmission is sent to the
* connected server. If there is any pending data in the send buffer, it is
* transmitted over the network.
*/
virtual void flush();

/**
* @brief Closes the connection to the remote server
* and releases any resources associated with it.
* @brief Closes the connection to the server and clears the receive buffer.
*/
virtual void stop();

/**
* @brief Checks whether the client is currently connected to a remote server.
* @brief Checks if the client is connected to a server.
*
* @return Returns a `uint8_t` value indicating the connection status of the client.
* @return Returns 1 if the client is connected, 0 otherwise.
*/
virtual uint8_t connected();

Expand All @@ -185,19 +177,23 @@ class WiFiClient : public Client {
};

/**
* @return Returns the IP address of the remote server to which the client is connected.
* @brief Retrieves the remote IP address of the server the client is connected to.
*
* @return The IP address of the remote server. If not connected, returns IPAddress(0, 0, 0, 0).
*/
virtual IPAddress remoteIP();

/**
* @return Returns the port number of the remote server for the connetec client.
* @brief Retrieves the remote port number of the server the client is connected to.
*
* @return Returns the port number of the remote server. If not connected, returns 0.
*/
virtual uint16_t remotePort();

/**
* @brief Sets the connection timeout value for the client.
* @param It takes an integer `timeout` as a parameter which determines how long the
* client will wait for a connection to be established before timing out.
* @brief Sets the connection timeout for the client.
*
* @param `timeout` is the timeout value in milliseconds.
*/
void setConnectionTimeout(int timeout) {
_connectionTimeout = timeout;
Expand Down