mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-13 05:17:13 +02:00
initial fixing
This commit is contained in:
@ -18,4 +18,18 @@ target_link_libraries(result
|
||||
|
||||
set_target_properties(result PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
||||
)
|
||||
)
|
||||
|
||||
add_executable(udp udp.cpp)
|
||||
target_link_libraries(udp
|
||||
slsDetectorShared
|
||||
slsSupportLib
|
||||
pthread
|
||||
rt
|
||||
)
|
||||
|
||||
set_target_properties(udp PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
||||
)
|
||||
|
||||
|
||||
|
13
sample/udp.cpp
Normal file
13
sample/udp.cpp
Normal file
@ -0,0 +1,13 @@
|
||||
#include "UdpSocket.h"
|
||||
#include <iostream>
|
||||
#include <chrono>
|
||||
#include <thread>
|
||||
int main(){
|
||||
std::cout << "HEJ\n";
|
||||
sls::UdpSocket s(50010, 1024);
|
||||
|
||||
while(true){
|
||||
std::cout << "Got: " << s.ReceivePacket() << " bytes\n";
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(5));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user