# libcoap_demo
**Repository Path**: wangweiHos/libcoap_demo
## Basic Information
- **Project Name**: libcoap_demo
- **Description**: 使用libcoap的demo
- **Primary Language**: C
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2023-01-05
- **Last Updated**: 2023-01-05
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# About
Examples that use the libcoap library
**Author** Nikos Fotiou
**Licence** You are free to use this code in any way you want. No credit is required.
**More Information** https://respected-professor.blogspot.gr/2016/07/libcoap-examples.html
# libcoap installation #
* git clone https://github.com/obgm/libcoap.git
* cd libcoap
* autogen.sh
* ./configure --disable-documentation
* make
* sudo make install
# Examples #
## Piggybacked ##
Sends a confirmable request to a server. The server responds with a "Hello
World" message. The response is piggybacked to the ACK (RFC 7252, Section 5.2.1).
### Compiling and running ###
* make all
* ./server
* ./client
## POST ##
Sends a POST request to a server. The server prints the posted data.
### Compiling and running ###
* make all
* ./server
* ./client
## Seperate ##
Sends a confirmable request to a server. The server responds with an ACK and afer
2 seconds it sends a "Hello World" message. (RFC 7252, Section 5.2.2).
### Compiling and running ###
* make all
* ./server
* ./client
## Riot ##
An example of libcoap usage with the riot operating system (https://riot-os.org/).
It creates a default resource that outputs "Hello World!"
### Compiling and running ###
Follow the standard process for compiling and running a riot application.
For more information visit https://respected-professor.blogspot.gr/2016/11/a-coap-server-for-riot-operating-system.html