From 1dc95b4eed7974549ef43a87e0777aa343b30fd4 Mon Sep 17 00:00:00 2001 From: Tobias Frust Date: Wed, 29 Jun 2016 21:44:58 +0200 Subject: added client and server executable for testing simple udp packet transfer --- src/main.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 2ff08b2..6898a09 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -12,10 +12,15 @@ int main (int argc, char *argv[]){ UDPClient client = UDPClient(address, port); - std::string msg = "test"; - std::size_t length{msg.size()}; + std::size_t length{8008}; - client.send(msg.c_str(), length); + char buf[length]; + for(auto i = 0; i < length; i++){ + *(buf+i) = i%128; + } + + + client.send(buf, length); return 0; -- cgit v1.2.3