summaryrefslogtreecommitdiffstats
path: root/src/main_server.cpp
diff options
context:
space:
mode:
authorTobias Frust <tobiasfrust@gmail.com>2016-06-30 10:13:01 +0200
committerTobias Frust <tobiasfrust@gmail.com>2016-06-30 10:13:01 +0200
commit5680aa99001cb50c707c4187cd8ada0c41a573dd (patch)
treefcbe575cd20e35dbe3d2b7def5e7c801d576aaf8 /src/main_server.cpp
parent1dc95b4eed7974549ef43a87e0777aa343b30fd4 (diff)
downloadods-5680aa99001cb50c707c4187cd8ada0c41a573dd.tar.gz
ods-5680aa99001cb50c707c4187cd8ada0c41a573dd.tar.bz2
ods-5680aa99001cb50c707c4187cd8ada0c41a573dd.tar.xz
ods-5680aa99001cb50c707c4187cd8ada0c41a573dd.zip
implemented virtual DetectorModule with simple send via udp
Diffstat (limited to 'src/main_server.cpp')
-rw-r--r--src/main_server.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main_server.cpp b/src/main_server.cpp
index b90de52..267023f 100644
--- a/src/main_server.cpp
+++ b/src/main_server.cpp
@@ -7,19 +7,19 @@ int main (int argc, char *argv[]){
std::cout << "Receiving UDP packages: " << std::endl;
- std::string address = "localhost";
- int port = 1234;
+ std::string address = "10.0.0.10";
+ int port = 4000;
UDPServer server = UDPServer(address, port);
- std::size_t length{8000};
+ std::size_t length{16*500};
- char buf[length];
+ unsigned short buf[length];
- server.recv(buf, length);
+ server.recv(buf, length*sizeof(unsigned short));
for(auto i = 0; i < length; i++){
- printf("%c", buf[i]);
+ printf("%i ", buf[i]);
}
printf("\n");