summaryrefslogtreecommitdiffstats
path: root/src/main.cpp
blob: 6898a09cd3c20038e0e89dbf54611822ec76a35a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include "UDPClient/UDPClient.h"

#include <iostream>
#include <string>

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::size_t length{8008};

  char buf[length];
  for(auto i = 0; i < length; i++){
    *(buf+i) = i%128;
  }


  client.send(buf, length);

  return 0;

}