server endpoint
This commit is contained in:
parent
33208be2b8
commit
b0f6c466b9
|
@ -21,7 +21,12 @@ find_package(Threads REQUIRED)
|
|||
|
||||
configure_file(config.json ${CMAKE_BUILD_RPATH} config.json COPYONLY)
|
||||
|
||||
add_executable(endpoint.cpp
|
||||
add_executable(client_endpoint
|
||||
endpoint.cpp
|
||||
src/sdk.h)
|
||||
target_link_libraries(endpoint.cpp PRIVATE Threads::Threads)
|
||||
target_link_libraries(client_endpoint PRIVATE Threads::Threads)
|
||||
|
||||
add_executable(server_endpoint
|
||||
server_endpoint.cpp
|
||||
src/sdk.h)
|
||||
target_link_libraries(server_endpoint PRIVATE Threads::Threads)
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
#include "src/sdk.h"
|
||||
//
|
||||
#include <boost/asio.hpp>
|
||||
#include <iostream>
|
||||
|
||||
using namespace boost;
|
||||
namespace sys = boost::system;
|
||||
using namespace std;
|
||||
|
||||
int main()
|
||||
{
|
||||
uint32_t port_num = 3333;
|
||||
|
||||
asio::ip::address ip_address = asio::ip::address_v6::any();
|
||||
|
||||
asio::ip::tcp::endpoint endpoint(ip_address, port_num);
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
Loading…
Reference in New Issue