NS example

Committer:
sunsmile2015
Date:
Tue May 02 15:29:27 2017 +0000
Revision:
0:f40a402e1725
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
sunsmile2015 0:f40a402e1725 1 ### Getting started with the network-socket API ###
sunsmile2015 0:f40a402e1725 2
sunsmile2015 0:f40a402e1725 3 This is a quick example of a simple HTTP client program using the
sunsmile2015 0:f40a402e1725 4 network-socket API that is provided as a part of [mbed-os](github.com/armmbed/mbed-os).
sunsmile2015 0:f40a402e1725 5
sunsmile2015 0:f40a402e1725 6 The program brings up an underlying network interface, and uses it to perform an HTTP
sunsmile2015 0:f40a402e1725 7 transaction over a TCPSocket.
sunsmile2015 0:f40a402e1725 8
sunsmile2015 0:f40a402e1725 9 **Note:** The current example is limited to the ethernet interface on supported devices.
sunsmile2015 0:f40a402e1725 10 To use the example with a different interface, you will need to modify main.cpp and
sunsmile2015 0:f40a402e1725 11 replace the EthernetInterface class with the appropriate interface.
sunsmile2015 0:f40a402e1725 12
sunsmile2015 0:f40a402e1725 13 ### Expected output ###
sunsmile2015 0:f40a402e1725 14
sunsmile2015 0:f40a402e1725 15 ```
sunsmile2015 0:f40a402e1725 16 IP address: 10.118.14.45
sunsmile2015 0:f40a402e1725 17 Netmask: 255.255.252.0
sunsmile2015 0:f40a402e1725 18 Gateway: 10.118.12.1
sunsmile2015 0:f40a402e1725 19 sent 39 [GET / HTTP/1.1]
sunsmile2015 0:f40a402e1725 20 recv 173 [HTTP/1.1 200 OK]
sunsmile2015 0:f40a402e1725 21 External IP address: 217.140.111.135
sunsmile2015 0:f40a402e1725 22 Done
sunsmile2015 0:f40a402e1725 23 ```
sunsmile2015 0:f40a402e1725 24
sunsmile2015 0:f40a402e1725 25 ### Documentation ###
sunsmile2015 0:f40a402e1725 26
sunsmile2015 0:f40a402e1725 27 More information on the network-socket API can be found in the [mbed handbook](https://docs.mbed.com/docs/mbed-os-api-reference/en/latest/APIs/communication/network_sockets/).
sunsmile2015 0:f40a402e1725 28
sunsmile2015 0:f40a402e1725 29 ### Known issues
sunsmile2015 0:f40a402e1725 30
sunsmile2015 0:f40a402e1725 31 - ARCH_PRO runtime fails for all toolchains - issue [here](https://github.com/ARMmbed/mbed-os-example-sockets/issues/17)