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