Move the rest of the net related things from trantor to core.

This commit is contained in:
Relintai 2022-02-10 09:42:13 +01:00
parent f1a528fbcf
commit e1a3ba0179
34 changed files with 36 additions and 35 deletions

View File

@ -7,8 +7,9 @@ env.core_sources = []
env.add_source_files(env.core_sources, "*.cpp")
env.add_source_files(env.core_sources, "./math/*.cpp")
env.add_source_files(env.core_sources, "./net/*.cpp")
env.add_source_files(env.core_sources, "./net/resolvers/*.cpp")
env.add_source_files(env.core_sources, "./net/connections/*.cpp")
env.add_source_files(env.core_sources, "./loops/*.cpp")
#todo move these to modules
env.add_source_files(env.core_sources, "./loops/poller/*.cpp")
env.add_source_files(env.core_sources, "./containers/*.cpp")
env.add_source_files(env.core_sources, "./log/*.cpp")

View File

@ -12,7 +12,7 @@
*
*/
#include "TcpConnectionImpl.h"
#include "tcp_connection_impl.h"
#include "core/loops/channel.h"
#include "core/net/socket.h"
#ifdef __linux__

View File

@ -14,7 +14,7 @@
#pragma once
#include <trantor/net/TcpConnection.h>
#include "core/net/tcp_connection.h"
#include "core/loops/timing_wheel.h"
#include <list>
#include <mutex>

View File

@ -12,7 +12,7 @@
*
*/
#include "Connector.h"
#include "connector.h"
#include "core/loops/channel.h"
#include "core/net/socket.h"

View File

@ -5,7 +5,7 @@
// Author: Tao An
#include "AresResolver.h"
#include "ares_resolver.h"
#include <ares.h>
#include "core/loops/channel.h"
#ifdef _WIN32

View File

@ -6,7 +6,7 @@
// Author: Tao An
#pragma once
#include <trantor/net/Resolver.h>
#include "core/net/resolver.h"
#include <trantor/utils/NonCopyable.h>
#include "core/loops/event_loop_thread.h"
#include <map>

View File

@ -1,4 +1,4 @@
#include "NormalResolver.h"
#include "normal_resolver.h"
#include "core/log/logger.h"
#ifdef _WIN32
#include <ws2tcpip.h>

View File

@ -6,7 +6,7 @@
// Author: Tao An
#pragma once
#include <trantor/net/Resolver.h>
#include "core/net/resolver.h"
#include <trantor/utils/NonCopyable.h>
#include "core/containers/concurrent_task_queue.h"
#include <memory>

View File

@ -9,10 +9,10 @@
// Taken from muduo and modified by an tao
#include <trantor/net/TcpClient.h>
#include "core/net/tcp_client.h"
#include "Connector.h"
#include "inner/TcpConnectionImpl.h"
#include "connector.h"
#include "core/net/connections/tcp_connection_impl.h"
#include "core/loops/event_loop.h"
#include "core/log/logger.h"

View File

@ -19,7 +19,7 @@
#pragma once
#include "core/loops/event_loop.h"
#include "core/net/inet_address.h"
#include <trantor/net/TcpConnection.h>
#include "tcp_connection.h"
#include <trantor/exports.h>
#include <functional>
#include <thread>

View File

@ -13,8 +13,8 @@
*/
#include "core/loops/acceptor.h"
#include "inner/TcpConnectionImpl.h"
#include <trantor/net/TcpServer.h>
#include "core/net/connections/tcp_connection_impl.h"
#include "core/net/tcp_server.h"
#include "core/log/logger.h"
#include <functional>
#include <vector>

View File

@ -18,7 +18,7 @@
#include "core/log/logger.h"
#include "core/loops/event_loop_thread_pool.h"
#include "core/net/inet_address.h"
#include <trantor/net/TcpConnection.h>
#include "core/net/tcp_connection.h"
#include "core/loops/timing_wheel.h"
#include <trantor/exports.h>
#include <string>

View File

@ -26,7 +26,7 @@
#include <drogon/utils/HttpConstraint.h>
#include <drogon/utils/Utilities.h>
#include "core/loops/event_loop.h"
#include <trantor/net/Resolver.h>
#include "core/net/resolver.h"
#include <trantor/utils/NonCopyable.h>
#include <chrono>
#include <functional>

View File

@ -16,7 +16,7 @@
#include "../src/impl_forwards.h"
#include <http/HttpTypes.h>
#include <trantor/net/TcpConnection.h>
#include "core/net/tcp_connection.h"
#include "core/containers/msg_buffer.h"
#include <trantor/utils/NonCopyable.h>
#include <deque>

View File

@ -15,7 +15,7 @@
#pragma once
#include "../src/impl_forwards.h"
#include <trantor/net/TcpConnection.h>
#include "core/net/tcp_connection.h"
#include "core/containers/msg_buffer.h"
#include <trantor/utils/NonCopyable.h>
#include <list>

View File

@ -18,8 +18,8 @@
#include <http/Cookie.h>
#include <drogon/HttpClient.h>
#include "core/loops/event_loop.h"
#include <trantor/net/Resolver.h>
#include <trantor/net/TcpClient.h>
#include "core/net/resolver.h"
#include "core/net/tcp_client.h"
#include <list>
#include <mutex>
#include <queue>

View File

@ -15,7 +15,7 @@
#pragma once
#include "impl_forwards.h"
#include <trantor/net/TcpServer.h>
#include "core/net/tcp_server.h"
#include "core/loops/callbacks.h"
#include <trantor/utils/NonCopyable.h>
#include <functional>

View File

@ -17,7 +17,7 @@
#include "impl_forwards.h"
#include <drogon/WebSocketClient.h>
#include "core/loops/event_loop.h"
#include <trantor/net/TcpClient.h>
#include "core/net/tcp_client.h"
#include <trantor/utils/NonCopyable.h>
#include <memory>

View File

@ -16,7 +16,7 @@
#include "impl_forwards.h"
#include <drogon/WebSocketConnection.h>
#include <trantor/net/TcpConnection.h>
#include "core/net/tcp_connection.h"
#include <trantor/utils/NonCopyable.h>
namespace drogon {

View File

@ -19,7 +19,7 @@
#include <drogon/drogon.h>
#include <drogon/drogon_test.h>
#include "core/loops/event_loop_thread.h"
#include <trantor/net/TcpClient.h>
#include "core/net/tcp_client.h"
#include <algorithm>
#include <atomic>

View File

@ -12,7 +12,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <trantor/net/TcpConnection.h>
#include "core/net/tcp_connection.h"
#include "core/log/async_file_logger.h"
#include <fcntl.h>

View File

@ -13,7 +13,7 @@
#include <mutex>
#include "core/net/inet_address.h"
#include <trantor/net/Resolver.h>
#include "core/net/resolver.h"
#include "core/log/logger.h"
#include "http/HttpRequestImpl.h"

View File

@ -1,4 +1,4 @@
#include <trantor/net/TcpClient.h>
#include "core/net/tcp_client.h"
#include "core/log/logger.h"
#include "core/loops/event_loop_thread.h"
#include <string>

View File

@ -1,4 +1,4 @@
#include <trantor/net/TcpServer.h>
#include "core/net/tcp_server.h"
#include "core/log/logger.h"
#include "core/loops/event_loop_thread.h"
#include <string>

View File

@ -1,4 +1,4 @@
#include <trantor/net/Resolver.h>
#include "core/net/resolver.h"
#include <iostream>
void dns(const std::shared_ptr<trantor::Resolver> &resolver)
{

View File

@ -1,4 +1,4 @@
#include <trantor/net/TcpServer.h>
#include "core/net/tcp_server.h"
#include "core/log/logger.h"
#include "core/loops/event_loop_thread.h"
#include <string>

View File

@ -1,4 +1,4 @@
#include <trantor/net/TcpClient.h>
#include "core/net/tcp_client.h"
#include "core/log/logger.h"
#include "core/loops/event_loop_thread.h"
#include <string>

View File

@ -1,4 +1,4 @@
#include <trantor/net/TcpServer.h>
#include "core/net/tcp_server.h"
#include "core/log/logger.h"
#include "core/loops/event_loop_thread.h"
#include <string>

View File

@ -1,4 +1,4 @@
#include <trantor/net/TcpServer.h>
#include "core/net/tcp_server.h"
#include "core/log/logger.h"
#include "core/loops/event_loop_thread.h"
#include <string>

View File

@ -1,4 +1,4 @@
#include <trantor/net/TcpClient.h>
#include "core/net/tcp_client.h"
#include "core/log/logger.h"
#include "core/loops/event_loop_thread.h"
#include <string>

View File

@ -1,4 +1,4 @@
#include <trantor/net/TcpServer.h>
#include "core/net/tcp_server.h"
#include "core/log/logger.h"
#include "core/loops/event_loop_thread.h"
#include <string>