알려진 버그 픽스

This commit is contained in:
2025-04-23 04:51:28 +09:00
parent cebf59ddd8
commit 995a27a15e
16 changed files with 98 additions and 38 deletions

View File

@@ -2,12 +2,56 @@ cmake_minimum_required(VERSION 3.5)
set(PROJECT_NAME "Client")
set(CMAKE_BUILD_TYPE Debug)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
project(${PROJECT_NAME})
project(${PROJECT_NAME} CXX)
add_executable(${PROJECT_NAME} src/client.cpp)
include(FetchContent)
FetchContent_Declare(
spdlog
GIT_REPOSITORY "https://github.com/gabime/spdlog.git"
GIT_TAG "v1.11.0"
GIT_SHALLOW ON
)
FetchContent_MakeAvailable(spdlog)
FetchContent_Declare(
GSL
GIT_REPOSITORY "https://github.com/microsoft/GSL.git"
GIT_TAG "v4.2.0"
GIT_SHALLOW ON
)
FetchContent_MakeAvailable(GSL)
FetchContent_Declare(
JSONCPP
GIT_REPOSITORY "https://github.com/open-source-parsers/jsoncpp.git"
GIT_TAG "1.9.6"
GIT_SHALLOW ON
)
FetchContent_MakeAvailable(JSONCPP)
file(GLOB_RECURSE additional_sources CONFIGURE_DEPENDS
"${CMAKE_CURRENT_SOURCE_DIR}/../impl/*.cpp"
)
add_executable(${PROJECT_NAME}
src/client.cpp
${additional_sources}
)
target_link_libraries(${PROJECT_NAME} PRIVATE Microsoft.GSL::GSL)
target_link_libraries(${PROJECT_NAME} PRIVATE spdlog)
target_link_libraries(${PROJECT_NAME} PRIVATE jsoncpp_lib)
if(WIN32)
target_link_libraries(${PROJECT_NAME} PRIVATE ws2_32)
endif()
target_include_directories(${PROJECT_NAME} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../include
${CMAKE_CURRENT_SOURCE_DIR}/include
)
)
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20)
target_precompile_headers(${PROJECT_NAME} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../include/precomp.hpp")

View File

@@ -1,5 +1,17 @@
#include <iostream>
#include "Socket/TCPSocket.hpp"
#include "Socket/Address.hpp"
#include "Socket/Log.hpp"
#include "precomp.hpp"
int main() {
std::cout << "Hello, world!" << std::endl;
Chattr::TCPSocket sock;
sock.init(AF_INET6);
Chattr::Address serveraddr;
serveraddr.addr_in6.sin6_family = AF_INET6;
inet_pton(AF_INET6, "fd8a:5f:3adb:774d:dfae:983f:2e7a:ffba", &serveraddr.addr_in6.sin6_addr);
serveraddr.addr_in6.sin6_port = htons(9010);
serveraddr.length = sizeof(sockaddr_in6);
sock.connect(serveraddr);
}