mirror of
https://github.com/Relintai/rcpp_framework.git
synced 2024-11-14 04:57:21 +01:00
Moved InetAddress from trantor to core.
This commit is contained in:
parent
9f39b21574
commit
a60b4681b6
@ -6,6 +6,7 @@ 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, "./containers/*.cpp")
|
||||
env.add_source_files(env.core_sources, "./log/*.cpp")
|
||||
env.add_source_files(env.core_sources, "./os/*.cpp")
|
||||
|
@ -6,10 +6,7 @@
|
||||
|
||||
// Author: Shuo Chen (chenshuo at chenshuo dot com)
|
||||
|
||||
#include <trantor/net/InetAddress.h>
|
||||
|
||||
#include <trantor/utils/Logger.h>
|
||||
//#include <muduo/net/Endian.h>
|
||||
#include "inet_address.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
struct in6_addr_uint {
|
||||
@ -23,6 +20,7 @@ struct in6_addr_uint {
|
||||
#include <netdb.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <strings.h> // memset
|
||||
#include <cstring>
|
||||
#endif
|
||||
|
||||
// INADDR_ANY use (type)value casting.
|
@ -20,8 +20,6 @@
|
||||
#ifndef MUDUO_NET_INETADDRESS_H
|
||||
#define MUDUO_NET_INETADDRESS_H
|
||||
|
||||
#include <trantor/exports.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <ws2tcpip.h>
|
||||
using sa_family_t = unsigned short;
|
||||
@ -35,13 +33,14 @@ using uint16_t = unsigned short;
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <mutex>
|
||||
|
||||
namespace trantor
|
||||
{
|
||||
/**
|
||||
* @brief Wrapper of sockaddr_in. This is an POD interface class.
|
||||
*
|
||||
*/
|
||||
class TRANTOR_EXPORT InetAddress
|
||||
class InetAddress
|
||||
{
|
||||
public:
|
||||
/**
|
@ -15,7 +15,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <http/HttpTypes.h>
|
||||
#include <trantor/net/InetAddress.h>
|
||||
#include "core/net/inet_address.h"
|
||||
#include <trantor/utils/NonCopyable.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
@ -15,7 +15,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <trantor/net/EventLoop.h>
|
||||
#include <trantor/net/InetAddress.h>
|
||||
#include "core/net/inet_address.h"
|
||||
#include "core/math/date.h"
|
||||
#include <trantor/utils/Logger.h>
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
#include <drogon/utils/string_view.h>
|
||||
#include <json/json.h>
|
||||
#include <trantor/net/InetAddress.h>
|
||||
#include "core/net/inet_address.h"
|
||||
#include "core/math/date.h"
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include <drogon/utils/Utilities.h>
|
||||
#include <stdio.h>
|
||||
#include <trantor/net/EventLoop.h>
|
||||
#include <trantor/net/InetAddress.h>
|
||||
#include "core/net/inet_address.h"
|
||||
#include <trantor/utils/Logger.h>
|
||||
#include <trantor/utils/MsgBuffer.h>
|
||||
#include <trantor/utils/NonCopyable.h>
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include <http/HttpResponse.h>
|
||||
|
||||
#include <drogon/utils/Utilities.h>
|
||||
#include <trantor/net/InetAddress.h>
|
||||
#include "core/net/inet_address.h"
|
||||
#include "core/math/date.h"
|
||||
#include <trantor/utils/MsgBuffer.h>
|
||||
#include <atomic>
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "WebSocketConnectionImpl.h"
|
||||
|
||||
#include <drogon/utils/Utilities.h>
|
||||
#include <trantor/net/InetAddress.h>
|
||||
#include "core/net/inet_address.h"
|
||||
#ifdef OPENSSL_FOUND
|
||||
#include <openssl/sha.h>
|
||||
#else
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
|
||||
#include <trantor/net/InetAddress.h>
|
||||
#include "core/net/inet_address.h"
|
||||
#include <trantor/net/Resolver.h>
|
||||
#include <trantor/utils/Logger.h>
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include <trantor/exports.h>
|
||||
#include <memory>
|
||||
#include <trantor/net/EventLoop.h>
|
||||
#include <trantor/net/InetAddress.h>
|
||||
#include "core/net/inet_address.h"
|
||||
|
||||
namespace trantor
|
||||
{
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#pragma once
|
||||
#include <trantor/net/EventLoop.h>
|
||||
#include <trantor/net/InetAddress.h>
|
||||
#include "core/net/inet_address.h"
|
||||
#include <trantor/net/TcpConnection.h>
|
||||
#include <trantor/exports.h>
|
||||
#include <functional>
|
||||
|
@ -15,7 +15,7 @@
|
||||
#pragma once
|
||||
#include <trantor/exports.h>
|
||||
#include <trantor/net/EventLoop.h>
|
||||
#include <trantor/net/InetAddress.h>
|
||||
#include "core/net/inet_address.h"
|
||||
#include <trantor/utils/NonCopyable.h>
|
||||
#include <trantor/utils/MsgBuffer.h>
|
||||
#include <trantor/net/callbacks.h>
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include <trantor/utils/NonCopyable.h>
|
||||
#include <trantor/utils/Logger.h>
|
||||
#include <trantor/net/EventLoopThreadPool.h>
|
||||
#include <trantor/net/InetAddress.h>
|
||||
#include "core/net/inet_address.h"
|
||||
#include <trantor/net/TcpConnection.h>
|
||||
#include <trantor/utils/TimingWheel.h>
|
||||
#include <trantor/exports.h>
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include <trantor/net/EventLoop.h>
|
||||
#include <trantor/utils/NonCopyable.h>
|
||||
#include "Socket.h"
|
||||
#include <trantor/net/InetAddress.h>
|
||||
#include "core/net/inet_address.h"
|
||||
#include "Channel.h"
|
||||
#include <functional>
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <trantor/net/EventLoop.h>
|
||||
#include <trantor/net/InetAddress.h>
|
||||
#include "core/net/inet_address.h"
|
||||
#include <atomic>
|
||||
#include <memory>
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <trantor/utils/NonCopyable.h>
|
||||
#include <trantor/net/InetAddress.h>
|
||||
#include "core/net/inet_address.h"
|
||||
#include <trantor/utils/Logger.h>
|
||||
#include <string>
|
||||
#ifndef _WIN32
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <trantor/net/InetAddress.h>
|
||||
#include "core/net/inet_address.h"
|
||||
#include <gtest/gtest.h>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
Loading…
Reference in New Issue
Block a user