File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
docs/reference/api/connectivity/networksocket Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -9,13 +9,13 @@ Ethernet driver for the target and select correct network stack.
9
9
10
10
### Usage
11
11
12
- For statically initializing the driver, just create an object without passing any parameters
12
+ To statically initialize the driver, create an object without passing any parameters:
13
13
14
14
``` cpp
15
15
EthernetInterface eth;
16
16
```
17
17
18
- Then, if default configuration is enough, bringing the interface up :
18
+ Then, if the default configuration is enough, bring up the interface:
19
19
20
20
``` cpp
21
21
nsapi_error_t status = eth.connect();
@@ -33,22 +33,19 @@ UDPSocket socket;
33
33
socket.open(ð);
34
34
```
35
35
36
-
37
36
### Configuration
38
37
39
- For EthernetInterface, there is two possible configurations
38
+ For EthernetInterface, there are two possible configurations:
40
39
41
- 1 . Use DHCP for network addressing. This is the default.
42
- 2 . Use statically configured IP addresses.
40
+ - Use DHCP for network addressing. This is the default.
41
+ - Use statically configured IP addresses.
43
42
44
43
Refer to the API below for how to set the IP addresses by calling the ` set_network() ` function.
45
44
46
-
47
45
### EthInterface class reference
48
46
49
47
[ ![ View code] ( https://www.mbed.com/embed/?type=library )] ( http://os-doc-builder.test.mbed.com/docs/development/mbed-os-api-doxy/class_eth_interface.html )
50
48
51
-
52
49
### EthInterface examples
53
50
54
51
Here is an example of an HTTP client program. The program brings up Ethernet as the underlying network interface and uses it to perform an HTTP transaction over a TCPSocket:
You can’t perform that action at this time.
0 commit comments