Skip to content

Commit 63c5d3d

Browse files
committed
api.md - fix documenation of client.connect
1 parent 39103da commit 63c5d3d

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

docs/api.md

+3-9
Original file line numberDiff line numberDiff line change
@@ -1468,27 +1468,21 @@ Connects to a specified IP address and port. The return value indicates success
14681468
#### Syntax
14691469

14701470
```
1471-
client.connect()
14721471
client.connect(ip, port)
1473-
client.connect(URL, port)
1472+
client.connect(servername, port)
14741473
14751474
```
14761475

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

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

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

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

1487-
- SUCCESS 1
1488-
- TIMED_OUT -1
1489-
- INVALID_SERVER -2
1490-
- TRUNCATED -3
1491-
- INVALID_RESPONSE -4
14921486
#### Example
14931487

14941488
```

0 commit comments

Comments
 (0)