diff options
Diffstat (limited to 'src/main_server.cpp')
-rw-r--r-- | src/main_server.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/main_server.cpp b/src/main_server.cpp new file mode 100644 index 0000000..b90de52 --- /dev/null +++ b/src/main_server.cpp @@ -0,0 +1,28 @@ +#include "UDPServer/UDPServer.h" + +#include <iostream> +#include <string> + +int main (int argc, char *argv[]){ + + std::cout << "Receiving UDP packages: " << std::endl; + + std::string address = "localhost"; + int port = 1234; + + UDPServer server = UDPServer(address, port); + + std::size_t length{8000}; + + char buf[length]; + + server.recv(buf, length); + + for(auto i = 0; i < length; i++){ + printf("%c", buf[i]); + } + printf("\n"); + + return 0; + +} |