로거 완성

This commit is contained in:
2025-04-22 04:04:43 +09:00
parent 819bd5362e
commit 3a3cdc130a
11 changed files with 206 additions and 91 deletions

32
include/Socket/Socket.hpp Normal file
View File

@@ -0,0 +1,32 @@
#pragma once
#include "precomp.hpp"
namespace Chattr {
class Socket {
public:
Socket() {}
Socket(int domain, int type, int protocol);
~Socket();
operator SOCKET() const;
void bind(int __fd, const sockaddr *__addr);
void bind(int __fd, const sockaddr *__addr, socklen_t __len);
//IPV4
void bind(int __fd, const sockaddr_in *__addr);
void bind(int __fd, const sockaddr_in *__addr, socklen_t __len);
//IPV6
void bind(int __fd, const sockaddr_in6 *__addr);
void bind(int __fd, const sockaddr_in6 *__addr, socklen_t __len);
Socket(const Socket&) = delete;
Socket& operator=(const Socket&) = delete;
private:
bool valid_ = false;
SOCKET sock_ = INVALID_SOCKET;
};
}