알려진 버그 픽스

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

@@ -4,10 +4,14 @@
namespace Chattr {
struct Address {
Address() {
memset(&addr_in6, 0, sizeof(addr_in6));
}
union {
struct sockaddr sockaddr;
struct sockaddr_in sockaddr_in;
struct sockaddr_in6 sockaddr_in6;
struct sockaddr addr;
struct sockaddr_in addr_in;
struct sockaddr_in6 addr_in6;
};
socklen_t length;
};

View File

@@ -6,10 +6,12 @@ namespace Chattr {
class TCPSocket : public Socket {
public:
using Socket::Socket;
using Socket::init;
void init(int domain);
void listen(int __n);
void accept(TCPSocket& newSock, Address& addr);
void connect(Chattr::Address serveraddr);
};
}

View File

@@ -1,20 +0,0 @@
#pragma once
#include "precomp.hpp"
#include <json/json.h>
namespace Chattr {
class ConfigManager {
public:
struct Config {
Json::Value configJsonRoot;
std::uint32_t ipVersion = 0;
std::uint32_t listenPort = 0;
spdlog::level::level_enum logLevel = spdlog::level::off;
gsl::czstring logFileName = "";
std::uint32_t logfileSize = 0;
std::uint32_t logfileCount = 0;
};
static Config load();
};
}

View File

@@ -8,6 +8,7 @@
#elif __linux__
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <errno.h>
#include <netinet/in.h>
#define SOCKET int