NS example

Committer:
sunsmile2015
Date:
Tue May 02 15:29:51 2017 +0000
Revision:
0:982dd6d721f3
Initial commit

Who changed what in which revision?

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