Skip to content

Commit

Permalink
Merge pull request #240 from JAndrassy/docs_api_client_connect_return
Browse files Browse the repository at this point in the history
api.md - fix documenation of client.connect
  • Loading branch information
per1234 authored May 3, 2024
2 parents 78aeaf5 + 63c5d3d commit 63eec86
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1468,27 +1468,21 @@ Connects to a specified IP address and port. The return value indicates success
#### Syntax

```
client.connect()
client.connect(ip, port)
client.connect(URL, port)
client.connect(servername, port)
```

#### Parameters
- ip: the IP address that the client will connect to (array of 4 bytes)

- URL: the domain name the client will connect to (string, ex.:"arduino.cc")
- servername: the domain name the client will connect to (string, ex.:"arduino.cc")

- port: the port that the client will connect to (int)

#### Returns
- Returns an int (1,-1,-2,-3,-4) indicating connection status :
- Returns true if the connection succeeds, false if not.

- SUCCESS 1
- TIMED_OUT -1
- INVALID_SERVER -2
- TRUNCATED -3
- INVALID_RESPONSE -4
#### Example

```
Expand Down

0 comments on commit 63eec86

Please sign in to comment.