.dll .so 복사 자동화 완료

This commit is contained in:
2025-04-28 11:25:53 +09:00
parent f76e1b9a5d
commit 41c75b9dca
15 changed files with 165 additions and 69 deletions

View File

@@ -0,0 +1,21 @@
#pragma once
#include "Socket/TCPSocket.hpp"
#include <vector>
namespace Chattr {
class Session {
public:
Session();
~Session();
bool init();
void destruct();
int send();
int recv();
private:
struct std::vector<Chattr::TCPSocket> tcpSock_;
struct std::vector<Chattr::Socket> udpSock_;
};
}

View File

@@ -1,19 +0,0 @@
#pragma once
namespace Chattr {
class Sesson {
public:
Sesson();
~Session();
bool init();
void destruct();
int send();
int recv();
private:
struct std::vector<Chattr::TCPSocket> sock;
struct std::vector<Chattr::Socket> sock;
};
}

View File

@@ -15,8 +15,7 @@ public:
void destruct();
operator SOCKET() const;
void move(const SOCKET);
Socket& move();
void set(const SOCKET);
void bind(sockaddr *__addr);
void bind(sockaddr *__addr, socklen_t __len);
@@ -29,6 +28,9 @@ public:
void bind(sockaddr_in6 *__addr);
void bind(sockaddr_in6 *__addr, socklen_t __len);
int recvfrom(void *__restrict __buf, size_t __n, int __flags, struct Address& __addr);
int sendto(const void *__buf, size_t __n, int __flags, struct Address __addr);
Socket(const Socket&) = delete;
Socket(Socket&&);
Socket& operator=(const Socket&) = delete;

View File

@@ -11,6 +11,8 @@ public:
void listen(int __n);
void accept(TCPSocket& newSock, Address& addr);
void connect(Chattr::Address& serveraddr);
int recv(void *__restrict __buf, size_t __n, int __flags);
int send(const void *__buf, size_t __n, int __flags);
};
}

View File

@@ -0,0 +1,17 @@
#pragma once
#include <cstdint>
namespace Chattr {
struct Snowflake {
union {
struct {
std::uint64_t timestamp : 42;
std::uint64_t instance : 10;
std::uint64_t sequence : 12;
};
std::uint64_t snowflake;
};
};
}

View File

@@ -45,7 +45,7 @@ public:
~Thread();
void join();
void deatch();
void detach();
private:
#ifdef _WIN32

View File

@@ -14,6 +14,7 @@
#include <netinet/in.h>
#define SOCKET int
#define INVALID_SOCKET -1
#define SOCKET_ERROR -1
#else
#error "이 플랫폼은 지원되지 않습니다."
#endif