Functions
udp_hello_world.cpp File Reference
#include <async_comm/udp.h>
#include <cstdint>
#include <cstring>
#include <iostream>
#include <chrono>
#include <thread>
#include <vector>
Include dependency graph for udp_hello_world.cpp:

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 ()
 

Detailed Description

Author
Daniel Koch danie.nosp@m.lpko.nosp@m.ch@gm.nosp@m.ail..nosp@m.com

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.

Function Documentation

void callback ( const uint8_t *  buf,
size_t  len 
)

Callback function for the async_comm library.

Prints the received bytes to stdout.

Parameters
bufReceived bytes buffer
lenNumber 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.



async_comm
Author(s):
autogenerated on Fri May 14 2021 02:35:38