Rebuild directory structure

This commit is contained in:
2026-07-22 22:02:06 +08:00
parent 973b2e60de
commit c5e4d5a3a5
13 changed files with 209 additions and 253 deletions
+8 -10
View File
@@ -1,22 +1,20 @@
#include "pool.hpp"
#include "socket.hpp"
#include "address.hpp"
int main(int argc, char **argv) try {
int iResult = 0;
ThreadPool pool;
WSA wsa;
auto server = pool.submit([]() -> int {
return 0;
});
AddrInfoPtr ptr;
AddrInfo hints;
hints->ai_family = AF_INET;
hints->ai_socktype = SOCK_STREAM;
hints->ai_protocol = IPPROTO_TCP;
hints->ai_flags = AI_PASSIVE;
AddrInfoPtr result = hints.get_addrinfo(NULL, "8088");
AddrInfoPtr result = AddrInfo::get_local_addrinfo("17900");
Socket listen_socket;
listen_socket.from_addrinfo(*ptr, Socket::BIND);
Socket client_socket = listen_socket.accept_client();