tcp/udp 추가, todo:iocp openssl 지원하도록 업데이트하기

This commit is contained in:
2025-05-27 21:52:21 +09:00
parent 27f1e63c98
commit 466a80f02b
25 changed files with 1056 additions and 6 deletions

27
include/socket/address.h Normal file
View File

@@ -0,0 +1,27 @@
#pragma once
namespace Socket {
struct Address {
Address();
Address(int type, gsl::czstring presentationAddr, std::uint16_t port);
void zeroFill();
void set(int type, gsl::czstring presentationAddr, std::uint16_t port);
void set(int type, in_addr_t addr, std::uint16_t port);
void set(int type, in_addr addr, std::uint16_t port);
void set(int type, in6_addr addr, std::uint16_t port);
void setType(int type);
operator std::string();
std::uint16_t getPort();
union {
struct sockaddr addr;
struct sockaddr_in addr_in;
struct sockaddr_in6 addr_in6;
};
socklen_t length;
};
} // namespace Chattr