Skip to content

Commit

Permalink
[sample] add TCP echo server and client (openthread#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
KaSroka authored and bukepo committed Dec 19, 2018
1 parent aa83a0c commit dddc755
Show file tree
Hide file tree
Showing 6 changed files with 509 additions and 1 deletion.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,10 @@ A sample config is given below:
`CLOUDIOT_CERT` is the first certificate from [https://pki.google.com/roots.pem](https://pki.google.com/roots.pem)

You can use command `test mqtt` to test connect and publish a message to Google Cloud IoT core.

### TCP echo server and client
Commands:
- `tcp_echo_server port` starts TCP echo server on given `port`.
- `tcp_connect ipaddr port` connects to given TCP server.
- `tcp_send size count` sends `count` packets with given `size` to connected TCP server. At the end it prints statistics.
- `tcp_disconnect` disconnects from TCP server.
1 change: 1 addition & 0 deletions src/apps/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ cmake_minimum_required (VERSION 3.7)
add_library(test_app
${CMAKE_CURRENT_SOURCE_DIR}/http.c
${CMAKE_CURRENT_SOURCE_DIR}/mqtt.cpp
${CMAKE_CURRENT_SOURCE_DIR}/tcp_utils.c
${CMAKE_CURRENT_SOURCE_DIR}/user.c)

target_link_libraries(test_app
Expand Down
Loading

0 comments on commit dddc755

Please sign in to comment.