#include <async_comm/udp.h>#include <cstdint>#include <cstring>#include <iostream>#include <chrono>#include <thread>#include <vector>
Go to the source code of this file.
Functions | |
| void | callback (const uint8_t *buf, size_t len) |
| Callback function for the async_comm library. More... | |
| int | main () |
This example opens two UDP objects listening on different ports on the local host, and then uses each to send a simple "hello world" message to the other.
Definition in file udp_hello_world.cpp.
| void callback | ( | const uint8_t * | buf, |
| size_t | len | ||
| ) |
Callback function for the async_comm library.
Prints the received bytes to stdout.
| buf | Received bytes buffer |
| len | Number of bytes received |
Definition at line 60 of file udp_hello_world.cpp.
| int main | ( | ) |
Definition at line 69 of file udp_hello_world.cpp.