From 38b0d8ad024d11fa643934b0c56690b0e57c3e35 Mon Sep 17 00:00:00 2001 From: Tobias Frust Date: Wed, 29 Jun 2016 19:16:11 +0200 Subject: added UDP-Client and Server classes for data transfer via Ethernet --- src/main.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index e69de29..2ff08b2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -0,0 +1,22 @@ +#include "UDPClient/UDPClient.h" + +#include +#include + +int main (int argc, char *argv[]){ + + std::cout << "Sending UDP packages: " << std::endl; + + std::string address = "192.168.178.33"; + int port = 1234; + + UDPClient client = UDPClient(address, port); + + std::string msg = "test"; + std::size_t length{msg.size()}; + + client.send(msg.c_str(), length); + + return 0; + +} -- cgit v1.2.3