summaryrefslogtreecommitdiffstats
path: root/src/main_server.cpp
blob: 267023fb713c99ff0afff12d1ae60ca4d7bdb00c (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
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 = "10.0.0.10";
  int port = 4000;

  UDPServer server = UDPServer(address, port);

  std::size_t length{16*500};

  unsigned short buf[length];

  server.recv(buf, length*sizeof(unsigned short));

  for(auto i = 0; i < length; i++){
    printf("%i ", buf[i]);
  }
  printf("\n");

  return 0;

}