├── _config.yml ├── third_include ├── jemalloc │ ├── config.stamp │ ├── config.stamp.in │ ├── test │ │ ├── unit │ │ │ ├── double_free.h │ │ │ ├── junk_alloc.c │ │ │ ├── junk_free.c │ │ │ ├── batch_alloc_prof.c │ │ │ ├── malloc_conf_2.sh │ │ │ ├── tcache_max.sh │ │ │ ├── zero_reallocs.sh │ │ │ ├── zero_realloc_abort.sh │ │ │ ├── zero_realloc_alloc.sh │ │ │ ├── zero_realloc_free.sh │ │ │ ├── arena_reset_prof.sh │ │ │ ├── batch_alloc.sh │ │ │ ├── san.sh │ │ │ ├── batch_alloc_prof.sh │ │ │ ├── binshard.sh │ │ │ ├── arena_decay.sh │ │ │ ├── arena_reset_prof.c │ │ │ ├── inspect.sh │ │ │ ├── size_check.sh │ │ │ ├── hpa_background_thread.sh │ │ │ ├── junk.sh │ │ │ ├── pack.sh │ │ │ ├── thread_event.sh │ │ │ ├── zero.sh │ │ │ ├── junk_alloc.sh │ │ │ ├── junk_free.sh │ │ │ ├── prof_mdump.sh │ │ │ ├── prof_thread_name.sh │ │ │ ├── prof_log.sh │ │ │ ├── prof_tctx.sh │ │ │ ├── safety_check.sh │ │ │ ├── prof_gdump.sh │ │ │ ├── prof_hook.sh │ │ │ ├── prof_accum.sh │ │ │ ├── prof_stats.sh │ │ │ ├── prof_recent.sh │ │ │ ├── prof_reset.sh │ │ │ ├── prof_active.sh │ │ │ ├── prof_sys_thread_name.sh │ │ │ ├── prof_idump.sh │ │ │ ├── a0.c │ │ │ ├── spin.c │ │ │ ├── zero_realloc_abort.c │ │ │ ├── div.c │ │ │ ├── malloc_conf_2.c │ │ │ ├── pages.c │ │ │ ├── zero_realloc_free.c │ │ │ ├── test_hooks.c │ │ │ ├── thread_event.c │ │ │ ├── sc.c │ │ │ └── zero_reallocs.c │ │ ├── include │ │ │ └── test │ │ │ │ ├── sleep.h │ │ │ │ ├── thd.h │ │ │ │ ├── jemalloc_test_defs.h.in │ │ │ │ ├── timer.h │ │ │ │ ├── jemalloc_test_defs.h │ │ │ │ ├── bgthd.h │ │ │ │ ├── san.h │ │ │ │ ├── mtx.h │ │ │ │ └── btalloc.h │ │ ├── src │ │ │ ├── math.c │ │ │ ├── btalloc_0.c │ │ │ ├── btalloc_1.c │ │ │ ├── btalloc.c │ │ │ ├── sleep.c │ │ │ └── thd.c │ │ ├── integration │ │ │ ├── extent.sh │ │ │ ├── mallocx.sh │ │ │ ├── xallocx.sh │ │ │ ├── smallocx.sh │ │ │ ├── slab_sizes.sh │ │ │ ├── cpp │ │ │ │ ├── infallible_new_false.sh │ │ │ │ ├── infallible_new_true.sh │ │ │ │ ├── infallible_new_false.cpp │ │ │ │ └── basic.cpp │ │ │ └── malloc.c │ │ └── stress │ │ │ └── large_microbench.c │ ├── VERSION │ ├── run_tests.sh │ ├── scripts │ │ ├── freebsd │ │ │ ├── script.sh │ │ │ ├── before_install.sh │ │ │ └── before_script.sh │ │ ├── windows │ │ │ ├── script.sh │ │ │ └── before_script.sh │ │ ├── linux │ │ │ └── before_install.sh │ │ └── check-formatting.sh │ ├── msvc │ │ ├── test_threads │ │ │ ├── test_threads.h │ │ │ └── test_threads_main.cpp │ │ ├── ReadMe.txt │ │ └── projects │ │ │ ├── vc2015 │ │ │ └── test_threads │ │ │ │ └── test_threads.vcxproj.filters │ │ │ └── vc2017 │ │ │ └── test_threads │ │ │ └── test_threads.vcxproj.filters │ ├── include │ │ ├── jemalloc │ │ │ ├── internal │ │ │ │ ├── private_namespace.sh │ │ │ │ ├── public_unnamespace.sh │ │ │ │ ├── public_namespace.sh │ │ │ │ ├── tsd_types.h │ │ │ │ ├── slab_data.h │ │ │ │ ├── extent_mmap.h │ │ │ │ ├── bin_types.h │ │ │ │ ├── hpa_hooks.h │ │ │ │ ├── prof_stats.h │ │ │ │ ├── public_unnamespace.h │ │ │ │ ├── public_symbols.txt │ │ │ │ ├── prof_log.h │ │ │ │ ├── arena_inlines_a.h │ │ │ │ ├── spin.h │ │ │ │ ├── prof_hook.h │ │ │ │ ├── extent_dss.h │ │ │ │ ├── activity_callback.h │ │ │ │ ├── peak_event.h │ │ │ │ ├── prof_recent.h │ │ │ │ ├── peak.h │ │ │ │ ├── safety_check.h │ │ │ │ ├── test_hooks.h │ │ │ │ ├── large_externs.h │ │ │ │ └── public_namespace.h │ │ │ ├── jemalloc_rename.sh │ │ │ └── jemalloc.sh │ │ └── msvc_compat │ │ │ ├── windows_extra.h │ │ │ └── C99 │ │ │ └── stdbool.h │ ├── bin │ │ ├── jemalloc.sh │ │ └── jemalloc.sh.in │ ├── doc │ │ ├── manpages.xsl.in │ │ ├── manpages.xsl │ │ ├── html.xsl.in │ │ ├── html.xsl │ │ └── stylesheet.xsl │ ├── src │ │ ├── edata.c │ │ ├── exp_grow.c │ │ ├── test_hooks.c │ │ ├── ticker.py │ │ ├── counter.c │ │ ├── ecache.c │ │ ├── extent_mmap.c │ │ ├── bin_info.c │ │ └── pai.c │ ├── autogen.sh │ ├── jemalloc.pc │ ├── jemalloc.pc.in │ └── README ├── shm_queue │ ├── shm_queue_Linux.hpp │ └── shm_queue_Windows.hpp ├── spdlog │ ├── fmt │ │ ├── bundled │ │ │ └── locale.h │ │ ├── xchar.h │ │ ├── chrono.h │ │ ├── ostr.h │ │ ├── ranges.h │ │ ├── compile.h │ │ ├── std.h │ │ └── fmt.h │ ├── details │ │ ├── windows_include.h │ │ ├── periodic_worker-inl.h │ │ ├── console_globals.h │ │ ├── synchronous_factory.h │ │ ├── log_msg_buffer.h │ │ └── null_mutex.h │ ├── version.h │ ├── fwd.h │ ├── formatter.h │ ├── sinks │ │ ├── sink-inl.h │ │ └── sink.h │ └── cfg │ │ ├── helpers.h │ │ └── env.h ├── openssl │ ├── ecdh.h │ ├── ecdsa.h │ ├── asn1_mac.h │ ├── pem2.h │ ├── ssl2.h │ ├── __DECC_INCLUDE_EPILOGUE.H │ ├── __DECC_INCLUDE_PROLOGUE.H │ ├── buffererr.h │ ├── rc4.h │ ├── ebcdic.h │ ├── mdc2.h │ ├── cmac.h │ └── md2.h └── asio │ ├── unyield.hpp │ ├── yield.hpp │ ├── ts │ ├── io_context.hpp │ ├── buffer.hpp │ ├── net.hpp │ ├── timer.hpp │ ├── socket.hpp │ └── executor.hpp │ ├── detail │ ├── limits.hpp │ ├── cstddef.hpp │ ├── array.hpp │ ├── exception.hpp │ ├── functional.hpp │ ├── date_time_fwd.hpp │ ├── regex_fwd.hpp │ ├── array_fwd.hpp │ ├── dependent_type.hpp │ ├── win_iocp_thread_info.hpp │ ├── impl │ │ └── thread_context.ipp │ ├── assert.hpp │ ├── operation.hpp │ ├── cstdint.hpp │ ├── noncopyable.hpp │ ├── fd_set_adapter.hpp │ ├── fenced_block.hpp │ ├── null_fenced_block.hpp │ ├── scheduler_thread_info.hpp │ ├── resolve_op.hpp │ ├── signal_init.hpp │ └── future.hpp │ ├── io_service_strand.hpp │ ├── buffered_stream_fwd.hpp │ ├── version.hpp │ ├── buffered_read_stream_fwd.hpp │ ├── buffered_write_stream_fwd.hpp │ ├── signal_set.hpp │ ├── system_error.hpp │ ├── ssl.hpp │ ├── static_thread_pool.hpp │ ├── streambuf.hpp │ ├── io_service.hpp │ ├── ssl │ ├── impl │ │ └── src.hpp │ └── detail │ │ └── openssl_types.hpp │ ├── impl │ ├── system_context.hpp │ └── executor.ipp │ ├── associator.hpp │ ├── stream_file.hpp │ ├── basic_streambuf_fwd.hpp │ ├── readable_pipe.hpp │ ├── writable_pipe.hpp │ ├── experimental │ ├── append.hpp │ ├── prepend.hpp │ ├── as_tuple.hpp │ └── deferred.hpp │ ├── random_access_file.hpp │ ├── serial_port.hpp │ ├── posix │ ├── descriptor.hpp │ └── stream_descriptor.hpp │ ├── execution │ └── impl │ │ └── bad_executor.ipp │ ├── error_code.hpp │ ├── windows │ ├── stream_handle.hpp │ ├── object_handle.hpp │ └── random_access_handle.hpp │ ├── ip │ └── host_name.hpp │ ├── execution.hpp │ ├── deadline_timer.hpp │ ├── steady_timer.hpp │ └── system_timer.hpp ├── tests ├── make_test_report_html.sh ├── test_Iotoio.h ├── test_buffpacket.cpp ├── cmake │ └── FindGTEST.cmake ├── test_buffpacket.h ├── test_pss_asio.vcxproj.user ├── test_Iotoio.cpp └── test_pss_asio.cpp ├── Icon.jpg ├── Build └── Windows │ ├── libssl.dll │ ├── libcrypto.dll │ └── dh2048.pem ├── PSS_ASIO ├── lib │ ├── libssl.lib │ └── libcrypto.lib ├── Common │ ├── IoNetServer.h │ ├── IoContextPool.h │ ├── IoContextPool.cpp │ ├── ConnectCounter.cpp │ ├── SendBuffer.h │ ├── IoListManager.h │ ├── ConnectCounter.h │ ├── ServerService.h │ ├── ICommunicationService.h │ └── CoreTimer.hpp ├── Message │ ├── Iobridge.cpp │ ├── SessionAddrList.h │ ├── ModuleInterfalce.h │ ├── SyncLogic.h │ ├── ModuleInterfalce.cpp │ └── Iobridge.h ├── TcpSession │ ├── TcpSSLServer.cpp │ ├── TcpSSLSession.cpp │ └── TcpServer.h ├── PSS_ASIO.cpp ├── PSS_ASIO.vcxproj.user ├── sonar-project.properties └── QueueSession │ └── QueueService.h ├── PSS_ASIO_CLIENT ├── kcp_client.cpp ├── kcp_client.h ├── TcpSession │ ├── TcpSession.cpp │ └── TcpSession.h ├── UdpSession │ ├── UdpSession.cpp │ └── UdpSession.h ├── Common │ └── SendBuffer.h └── PSS_ASIO_CLIENT.vcxproj.user ├── PacketParse_Http ├── HttpFormat.cpp └── PacketParse_Http.vcxproj.user ├── Module_Logic └── Test_Logic │ ├── BaseCommand.h │ ├── BaseCommand.cpp │ └── Test_Logic.vcxproj.user ├── Common ├── VersionConfig.h.in ├── VersionConfig.h ├── IIoBridge.hpp └── IFrameObject.h ├── PSS_PLUGIN_LOGIC_MAKER ├── logic_maker_type.h ├── read_logic_json_info.cpp ├── Build │ └── template │ │ ├── template_Command.cpp │ │ └── template_Command.h ├── PSS_PLUGIN_LOGIC_MAKER.vcxproj.user └── PSS_PLUGIN_LOGIC_MAKER.cpp ├── NOTES-LINUX.md ├── md └── How_to_use_http_or_websocket.md ├── NOTES-WINDOWS.md ├── jemalloc.sh └── PacketParse_Interface ├── PacketParse_Interface.vcxproj.user └── PacketParse_Interface.vcxproj.filters /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-cayman -------------------------------------------------------------------------------- /third_include/jemalloc/config.stamp: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /third_include/jemalloc/config.stamp.in: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/double_free.h: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/junk_alloc.c: -------------------------------------------------------------------------------- 1 | #include "junk.c" 2 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/junk_free.c: -------------------------------------------------------------------------------- 1 | #include "junk.c" 2 | -------------------------------------------------------------------------------- /tests/make_test_report_html.sh: -------------------------------------------------------------------------------- 1 | python google_test.py Test_Pss_Asio.xml -------------------------------------------------------------------------------- /Icon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenArkStudio/PSS_ASIO/HEAD/Icon.jpg -------------------------------------------------------------------------------- /third_include/jemalloc/test/include/test/sleep.h: -------------------------------------------------------------------------------- 1 | void sleep_ns(unsigned ns); 2 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/batch_alloc_prof.c: -------------------------------------------------------------------------------- 1 | #include "batch_alloc.c" 2 | -------------------------------------------------------------------------------- /third_include/jemalloc/VERSION: -------------------------------------------------------------------------------- 1 | 0.0.0-0-g000000missing_version_try_git_fetch_tags 2 | -------------------------------------------------------------------------------- /third_include/jemalloc/run_tests.sh: -------------------------------------------------------------------------------- 1 | $(dirname "$)")/scripts/gen_run_tests.py | bash 2 | -------------------------------------------------------------------------------- /third_include/jemalloc/scripts/freebsd/script.sh: -------------------------------------------------------------------------------- 1 | #!/bin/tcsh 2 | 3 | gmake check 4 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/malloc_conf_2.sh: -------------------------------------------------------------------------------- 1 | export MALLOC_CONF="dirty_decay_ms:500" 2 | -------------------------------------------------------------------------------- /tests/test_Iotoio.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenArkStudio/PSS_ASIO/HEAD/tests/test_Iotoio.h -------------------------------------------------------------------------------- /third_include/jemalloc/test/src/math.c: -------------------------------------------------------------------------------- 1 | #define MATH_C_ 2 | #include "test/jemalloc_test.h" 3 | -------------------------------------------------------------------------------- /third_include/jemalloc/msvc/test_threads/test_threads.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | int test_threads(); 4 | -------------------------------------------------------------------------------- /Build/Windows/libssl.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenArkStudio/PSS_ASIO/HEAD/Build/Windows/libssl.dll -------------------------------------------------------------------------------- /PSS_ASIO/lib/libssl.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenArkStudio/PSS_ASIO/HEAD/PSS_ASIO/lib/libssl.lib -------------------------------------------------------------------------------- /tests/test_buffpacket.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenArkStudio/PSS_ASIO/HEAD/tests/test_buffpacket.cpp -------------------------------------------------------------------------------- /third_include/jemalloc/test/src/btalloc_0.c: -------------------------------------------------------------------------------- 1 | #include "test/jemalloc_test.h" 2 | 3 | btalloc_n_gen(0) 4 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/src/btalloc_1.c: -------------------------------------------------------------------------------- 1 | #include "test/jemalloc_test.h" 2 | 3 | btalloc_n_gen(1) 4 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/tcache_max.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export MALLOC_CONF="tcache_max:1024" 4 | -------------------------------------------------------------------------------- /Build/Windows/libcrypto.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenArkStudio/PSS_ASIO/HEAD/Build/Windows/libcrypto.dll -------------------------------------------------------------------------------- /PSS_ASIO/lib/libcrypto.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenArkStudio/PSS_ASIO/HEAD/PSS_ASIO/lib/libcrypto.lib -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/zero_reallocs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export MALLOC_CONF="zero_realloc:free" 4 | -------------------------------------------------------------------------------- /PSS_ASIO/Common/IoNetServer.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenArkStudio/PSS_ASIO/HEAD/PSS_ASIO/Common/IoNetServer.h -------------------------------------------------------------------------------- /PSS_ASIO/Message/Iobridge.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenArkStudio/PSS_ASIO/HEAD/PSS_ASIO/Message/Iobridge.cpp -------------------------------------------------------------------------------- /PSS_ASIO_CLIENT/kcp_client.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenArkStudio/PSS_ASIO/HEAD/PSS_ASIO_CLIENT/kcp_client.cpp -------------------------------------------------------------------------------- /PSS_ASIO_CLIENT/kcp_client.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenArkStudio/PSS_ASIO/HEAD/PSS_ASIO_CLIENT/kcp_client.h -------------------------------------------------------------------------------- /third_include/jemalloc/scripts/freebsd/before_install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/tcsh 2 | 3 | su -m root -c 'pkg install -y git' 4 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/zero_realloc_abort.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export MALLOC_CONF="zero_realloc:abort" 4 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/zero_realloc_alloc.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export MALLOC_CONF="zero_realloc:alloc" 4 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/zero_realloc_free.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export MALLOC_CONF="zero_realloc:free" 4 | -------------------------------------------------------------------------------- /PSS_ASIO/Common/IoContextPool.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenArkStudio/PSS_ASIO/HEAD/PSS_ASIO/Common/IoContextPool.h -------------------------------------------------------------------------------- /PacketParse_Http/HttpFormat.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenArkStudio/PSS_ASIO/HEAD/PacketParse_Http/HttpFormat.cpp -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/arena_reset_prof.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export MALLOC_CONF="prof:true,lg_prof_sample:0" 4 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/batch_alloc.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export MALLOC_CONF="tcache_gc_incr_bytes:2147483648" 4 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/san.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export MALLOC_CONF="san_guard_large:1,san_guard_small:1" 4 | -------------------------------------------------------------------------------- /PSS_ASIO/Common/IoContextPool.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenArkStudio/PSS_ASIO/HEAD/PSS_ASIO/Common/IoContextPool.cpp -------------------------------------------------------------------------------- /PSS_ASIO/Message/SessionAddrList.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenArkStudio/PSS_ASIO/HEAD/PSS_ASIO/Message/SessionAddrList.h -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/batch_alloc_prof.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export MALLOC_CONF="prof:true,lg_prof_sample:14" 4 | -------------------------------------------------------------------------------- /Module_Logic/Test_Logic/BaseCommand.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenArkStudio/PSS_ASIO/HEAD/Module_Logic/Test_Logic/BaseCommand.h -------------------------------------------------------------------------------- /PSS_ASIO/TcpSession/TcpSSLServer.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenArkStudio/PSS_ASIO/HEAD/PSS_ASIO/TcpSession/TcpSSLServer.cpp -------------------------------------------------------------------------------- /PSS_ASIO/TcpSession/TcpSSLSession.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenArkStudio/PSS_ASIO/HEAD/PSS_ASIO/TcpSession/TcpSSLSession.cpp -------------------------------------------------------------------------------- /Module_Logic/Test_Logic/BaseCommand.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenArkStudio/PSS_ASIO/HEAD/Module_Logic/Test_Logic/BaseCommand.cpp -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/binshard.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export MALLOC_CONF="narenas:1,bin_shards:1-160:16|129-512:4|256-256:8" 4 | -------------------------------------------------------------------------------- /Common/VersionConfig.h.in: -------------------------------------------------------------------------------- 1 | //VersionConfig.h.in 2 | #define V_BUILD_TIME "@build_time@" 3 | #define V_GIT_INFO "@GIT_BRANCH@_@GIT_HASH@" 4 | -------------------------------------------------------------------------------- /PSS_ASIO_CLIENT/TcpSession/TcpSession.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenArkStudio/PSS_ASIO/HEAD/PSS_ASIO_CLIENT/TcpSession/TcpSession.cpp -------------------------------------------------------------------------------- /PSS_ASIO_CLIENT/UdpSession/UdpSession.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenArkStudio/PSS_ASIO/HEAD/PSS_ASIO_CLIENT/UdpSession/UdpSession.cpp -------------------------------------------------------------------------------- /PSS_PLUGIN_LOGIC_MAKER/logic_maker_type.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenArkStudio/PSS_ASIO/HEAD/PSS_PLUGIN_LOGIC_MAKER/logic_maker_type.h -------------------------------------------------------------------------------- /Common/VersionConfig.h: -------------------------------------------------------------------------------- 1 | //VersionConfig.h.in 2 | #define V_BUILD_TIME "2023-09-07_12:37:27" 3 | #define V_GIT_INFO "master_v3.0.0-195-gafd6e625" 4 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/arena_decay.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export MALLOC_CONF="dirty_decay_ms:1000,muzzy_decay_ms:1000,tcache_max:1024" 4 | -------------------------------------------------------------------------------- /third_include/shm_queue/shm_queue_Linux.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenArkStudio/PSS_ASIO/HEAD/third_include/shm_queue/shm_queue_Linux.hpp -------------------------------------------------------------------------------- /third_include/shm_queue/shm_queue_Windows.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenArkStudio/PSS_ASIO/HEAD/third_include/shm_queue/shm_queue_Windows.hpp -------------------------------------------------------------------------------- /PSS_PLUGIN_LOGIC_MAKER/read_logic_json_info.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenArkStudio/PSS_ASIO/HEAD/PSS_PLUGIN_LOGIC_MAKER/read_logic_json_info.cpp -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/arena_reset_prof.c: -------------------------------------------------------------------------------- 1 | #include "test/jemalloc_test.h" 2 | #define ARENA_RESET_PROF_C_ 3 | 4 | #include "arena_reset.c" 5 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/inspect.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "x${enable_prof}" = "x1" ] ; then 4 | export MALLOC_CONF="prof:false" 5 | fi 6 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/size_check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "x${enable_prof}" = "x1" ] ; then 4 | export MALLOC_CONF="prof:false" 5 | fi 6 | -------------------------------------------------------------------------------- /third_include/spdlog/fmt/bundled/locale.h: -------------------------------------------------------------------------------- 1 | #include "xchar.h" 2 | #warning fmt/locale.h is deprecated, include fmt/format.h or fmt/xchar.h instead 3 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/integration/extent.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "x${enable_fill}" = "x1" ] ; then 4 | export MALLOC_CONF="junk:false" 5 | fi 6 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/integration/mallocx.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "x${enable_fill}" = "x1" ] ; then 4 | export MALLOC_CONF="junk:false" 5 | fi 6 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/integration/xallocx.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "x${enable_fill}" = "x1" ] ; then 4 | export MALLOC_CONF="junk:false" 5 | fi 6 | -------------------------------------------------------------------------------- /NOTES-LINUX.md: -------------------------------------------------------------------------------- 1 | Notes for Linux platforms 2 | =========================== 3 | 4 | First enter the path: 5 | cd \Build\Linux 6 | cmake ../../ 7 | make 8 | -------------------------------------------------------------------------------- /PSS_ASIO/Common/ConnectCounter.cpp: -------------------------------------------------------------------------------- 1 | #include "ConnectCounter.h" 2 | 3 | uint32 CConnectCounter::CreateCounter() 4 | { 5 | return ++count_index; 6 | } 7 | 8 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/integration/smallocx.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "x${enable_fill}" = "x1" ] ; then 4 | export MALLOC_CONF="junk:false" 5 | fi 6 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/hpa_background_thread.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export MALLOC_CONF="hpa_dirty_mult:0,hpa_min_purge_interval_ms:50,hpa_sec_nshards:0" 4 | 5 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/junk.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "x${enable_fill}" = "x1" ] ; then 4 | export MALLOC_CONF="abort:false,zero:false,junk:true" 5 | fi 6 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/pack.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Immediately purge to minimize fragmentation. 4 | export MALLOC_CONF="dirty_decay_ms:0,muzzy_decay_ms:0" 5 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/thread_event.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "x${enable_prof}" = "x1" ] ; then 4 | export MALLOC_CONF="prof:true,lg_prof_sample:0" 5 | fi 6 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/zero.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "x${enable_fill}" = "x1" ] ; then 4 | export MALLOC_CONF="abort:false,junk:false,zero:true" 5 | fi 6 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/integration/slab_sizes.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Some screwy-looking slab sizes. 4 | export MALLOC_CONF="slab_sizes:1-4096:17|100-200:1|128-128:2" 5 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/src/btalloc.c: -------------------------------------------------------------------------------- 1 | #include "test/jemalloc_test.h" 2 | 3 | void * 4 | btalloc(size_t size, unsigned bits) { 5 | return btalloc_0(size, bits); 6 | } 7 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/junk_alloc.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "x${enable_fill}" = "x1" ] ; then 4 | export MALLOC_CONF="abort:false,zero:false,junk:alloc" 5 | fi 6 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/junk_free.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "x${enable_fill}" = "x1" ] ; then 4 | export MALLOC_CONF="abort:false,zero:false,junk:free" 5 | fi 6 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/prof_mdump.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "x${enable_prof}" = "x1" ] ; then 4 | export MALLOC_CONF="prof:true,lg_prof_sample:0" 5 | fi 6 | 7 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/prof_thread_name.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "x${enable_prof}" = "x1" ] ; then 4 | export MALLOC_CONF="prof:true,prof_active:false" 5 | fi 6 | -------------------------------------------------------------------------------- /third_include/jemalloc/include/jemalloc/internal/private_namespace.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | for symbol in `cat "$@"` ; do 4 | echo "#define ${symbol} JEMALLOC_N(${symbol})" 5 | done 6 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/prof_log.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "x${enable_prof}" = "x1" ] ; then 4 | export MALLOC_CONF="prof:true,prof_active:true,lg_prof_sample:0" 5 | fi 6 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/prof_tctx.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "x${enable_prof}" = "x1" ] ; then 4 | export MALLOC_CONF="prof:true,prof_active:true,lg_prof_sample:0" 5 | fi 6 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/safety_check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "x${enable_prof}" = "x1" ] ; then 4 | export MALLOC_CONF="prof:true,prof_active:true,lg_prof_sample:0" 5 | fi 6 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/prof_gdump.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "x${enable_prof}" = "x1" ] ; then 4 | export MALLOC_CONF="prof:true,prof_active:false,prof_gdump:true" 5 | fi 6 | 7 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/prof_hook.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "x${enable_prof}" = "x1" ] ; then 4 | export MALLOC_CONF="prof:true,prof_active:true,lg_prof_sample:0" 5 | fi 6 | 7 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/prof_accum.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "x${enable_prof}" = "x1" ] ; then 4 | export MALLOC_CONF="prof:true,prof_accum:true,prof_active:false,lg_prof_sample:0" 5 | fi 6 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/prof_stats.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "x${enable_prof}" = "x1" ] ; then 4 | export MALLOC_CONF="prof:true,prof_active:true,lg_prof_sample:0,prof_stats:true" 5 | fi 6 | -------------------------------------------------------------------------------- /third_include/jemalloc/include/jemalloc/internal/public_unnamespace.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | for nm in `cat $1` ; do 4 | n=`echo ${nm} |tr ':' ' ' |awk '{print $1}'` 5 | echo "#undef je_${n}" 6 | done 7 | -------------------------------------------------------------------------------- /md/How_to_use_http_or_websocket.md: -------------------------------------------------------------------------------- 1 | Overview 2 | ======== 3 | 4 | You only need to compile the PacketParse_Http project, and then specify the specified port as the plug-in parser in the configuration file. 5 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/prof_recent.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "x${enable_prof}" = "x1" ] ; then 4 | export MALLOC_CONF="prof:true,prof_active:true,lg_prof_sample:0,prof_recent_alloc_max:3" 5 | fi 6 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/prof_reset.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "x${enable_prof}" = "x1" ] ; then 4 | export MALLOC_CONF="prof:true,prof_active:false,lg_prof_sample:0,prof_recent_alloc_max:0" 5 | fi 6 | -------------------------------------------------------------------------------- /third_include/jemalloc/include/msvc_compat/windows_extra.h: -------------------------------------------------------------------------------- 1 | #ifndef MSVC_COMPAT_WINDOWS_EXTRA_H 2 | #define MSVC_COMPAT_WINDOWS_EXTRA_H 3 | 4 | #include 5 | 6 | #endif /* MSVC_COMPAT_WINDOWS_EXTRA_H */ 7 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/prof_active.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "x${enable_prof}" = "x1" ] ; then 4 | export MALLOC_CONF="prof:true,prof_active:true,prof_thread_active_init:false,lg_prof_sample:0" 5 | fi 6 | -------------------------------------------------------------------------------- /third_include/jemalloc/include/jemalloc/internal/public_namespace.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | for nm in `cat $1` ; do 4 | n=`echo ${nm} |tr ':' ' ' |awk '{print $1}'` 5 | echo "#define je_${n} JEMALLOC_N(${n})" 6 | done 7 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/prof_sys_thread_name.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "x${enable_prof}" = "x1" ] ; then 4 | export MALLOC_CONF="prof:true,prof_active:true,lg_prof_sample:0,prof_sys_thread_name:true" 5 | fi 6 | -------------------------------------------------------------------------------- /third_include/jemalloc/bin/jemalloc.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | prefix=/usr/local 4 | exec_prefix=/usr/local 5 | libdir=${exec_prefix}/lib 6 | 7 | LD_PRELOAD=${libdir}/libjemalloc.so.2 8 | export LD_PRELOAD 9 | exec "$@" 10 | -------------------------------------------------------------------------------- /third_include/jemalloc/bin/jemalloc.sh.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | prefix=@prefix@ 4 | exec_prefix=@exec_prefix@ 5 | libdir=@libdir@ 6 | 7 | @LD_PRELOAD_VAR@=${libdir}/libjemalloc.@SOREV@ 8 | export @LD_PRELOAD_VAR@ 9 | exec "$@" 10 | -------------------------------------------------------------------------------- /third_include/jemalloc/doc/manpages.xsl.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/integration/cpp/infallible_new_false.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | XMALLOC_STR="" 4 | if [ "x${enable_xmalloc}" = "x1" ] ; then 5 | XMALLOC_STR="xmalloc:false," 6 | fi 7 | 8 | export MALLOC_CONF="${XMALLOC_STR}experimental_infallible_new:false" 9 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/integration/cpp/infallible_new_true.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | XMALLOC_STR="" 4 | if [ "x${enable_xmalloc}" = "x1" ] ; then 5 | XMALLOC_STR="xmalloc:false," 6 | fi 7 | 8 | export MALLOC_CONF="${XMALLOC_STR}experimental_infallible_new:true" 9 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/prof_idump.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export MALLOC_CONF="tcache:false" 4 | if [ "x${enable_prof}" = "x1" ] ; then 5 | export MALLOC_CONF="${MALLOC_CONF},prof:true,prof_accum:true,prof_active:false,lg_prof_sample:0,lg_prof_interval:0" 6 | fi 7 | 8 | 9 | -------------------------------------------------------------------------------- /third_include/jemalloc/scripts/windows/script.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | if [[ "$TRAVIS_OS_NAME" != "windows" ]]; then 6 | echo "Incorrect \$TRAVIS_OS_NAME: expected windows, got $TRAVIS_OS_NAME" 7 | exit 1 8 | fi 9 | 10 | $build_env mingw32-make -k check 11 | -------------------------------------------------------------------------------- /third_include/jemalloc/src/edata.c: -------------------------------------------------------------------------------- 1 | #include "jemalloc/internal/jemalloc_preamble.h" 2 | #include "jemalloc/internal/jemalloc_internal_includes.h" 3 | 4 | ph_gen(, edata_avail, edata_t, avail_link, 5 | edata_esnead_comp) 6 | ph_gen(, edata_heap, edata_t, heap_link, edata_snad_comp) 7 | -------------------------------------------------------------------------------- /third_include/spdlog/details/windows_include.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifndef NOMINMAX 4 | # define NOMINMAX // prevent windows redefining min/max 5 | #endif 6 | 7 | #ifndef WIN32_LEAN_AND_MEAN 8 | # define WIN32_LEAN_AND_MEAN 9 | #endif 10 | 11 | #include 12 | -------------------------------------------------------------------------------- /third_include/jemalloc/doc/manpages.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /third_include/jemalloc/doc/html.xsl.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /third_include/jemalloc/src/exp_grow.c: -------------------------------------------------------------------------------- 1 | #include "jemalloc/internal/jemalloc_preamble.h" 2 | #include "jemalloc/internal/jemalloc_internal_includes.h" 3 | 4 | void 5 | exp_grow_init(exp_grow_t *exp_grow) { 6 | exp_grow->next = sz_psz2ind(HUGEPAGE); 7 | exp_grow->limit = sz_psz2ind(SC_LARGE_MAXCLASS); 8 | } 9 | -------------------------------------------------------------------------------- /third_include/jemalloc/msvc/test_threads/test_threads_main.cpp: -------------------------------------------------------------------------------- 1 | #include "test_threads.h" 2 | #include 3 | #include 4 | #include 5 | 6 | using namespace std::chrono_literals; 7 | 8 | int main(int argc, char** argv) { 9 | int rc = test_threads(); 10 | return rc; 11 | } 12 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/include/test/thd.h: -------------------------------------------------------------------------------- 1 | /* Abstraction layer for threading in tests. */ 2 | #ifdef _WIN32 3 | typedef HANDLE thd_t; 4 | #else 5 | typedef pthread_t thd_t; 6 | #endif 7 | 8 | void thd_create(thd_t *thd, void *(*proc)(void *), void *arg); 9 | void thd_join(thd_t thd, void **ret); 10 | -------------------------------------------------------------------------------- /third_include/jemalloc/doc/html.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/a0.c: -------------------------------------------------------------------------------- 1 | #include "test/jemalloc_test.h" 2 | 3 | TEST_BEGIN(test_a0) { 4 | void *p; 5 | 6 | p = a0malloc(1); 7 | expect_ptr_not_null(p, "Unexpected a0malloc() error"); 8 | a0dalloc(p); 9 | } 10 | TEST_END 11 | 12 | int 13 | main(void) { 14 | return test_no_malloc_init( 15 | test_a0); 16 | } 17 | -------------------------------------------------------------------------------- /tests/cmake/FindGTEST.cmake: -------------------------------------------------------------------------------- 1 | find_path(GTEST_INCLUDE_DIR gtest.h /usr/include/ /usr/local/include /usr/src/googletest/googletest/include/) 2 | find_library(GTEST_LIBRARY NAMES gtest PATHS /usr/lib/ /usr/lib/x86_64-linux-gnu/) 3 | 4 | if (GTEST_INCLUDE_DIR AND GTEST_LIBRARY) 5 | set(GTEST_FOUND TRUE) 6 | endif (GTEST_INCLUDE_DIR AND GTEST_LIBRARY) -------------------------------------------------------------------------------- /tests/test_buffpacket.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include "ReadBuffer.hpp" 5 | #include "WriteBuffer.hpp" 6 | 7 | int test_buffpacket_number_data(); 8 | 9 | int test_buffpacket_string_data(); 10 | 11 | int test_offset_number_data(); 12 | 13 | int test_net_order_data(); 14 | 15 | int test_string_read_write(); 16 | -------------------------------------------------------------------------------- /PSS_PLUGIN_LOGIC_MAKER/Build/template/template_Command.cpp: -------------------------------------------------------------------------------- 1 | #include "[command head file]" 2 | 3 | void [class name]::Init(ISessionService* session_service) 4 | { 5 | session_service_ = session_service; 6 | 7 | [do message logic init] 8 | 9 | PSS_LOGGER_DEBUG("[[class name]::Init]init."); 10 | } 11 | 12 | [command logic function achieve] -------------------------------------------------------------------------------- /third_include/jemalloc/include/jemalloc/internal/tsd_types.h: -------------------------------------------------------------------------------- 1 | #ifndef JEMALLOC_INTERNAL_TSD_TYPES_H 2 | #define JEMALLOC_INTERNAL_TSD_TYPES_H 3 | 4 | #define MALLOC_TSD_CLEANUPS_MAX 4 5 | 6 | typedef struct tsd_s tsd_t; 7 | typedef struct tsdn_s tsdn_t; 8 | typedef bool (*malloc_tsd_cleanup_t)(void); 9 | 10 | #endif /* JEMALLOC_INTERNAL_TSD_TYPES_H */ 11 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/integration/malloc.c: -------------------------------------------------------------------------------- 1 | #include "test/jemalloc_test.h" 2 | 3 | TEST_BEGIN(test_zero_alloc) { 4 | void *res = malloc(0); 5 | assert(res); 6 | size_t usable = TEST_MALLOC_SIZE(res); 7 | assert(usable > 0); 8 | free(res); 9 | } 10 | TEST_END 11 | 12 | int 13 | main(void) { 14 | return test( 15 | test_zero_alloc); 16 | } 17 | -------------------------------------------------------------------------------- /third_include/jemalloc/autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | for i in autoconf; do 4 | echo "$i" 5 | $i 6 | if [ $? -ne 0 ]; then 7 | echo "Error $? in $i" 8 | exit 1 9 | fi 10 | done 11 | 12 | echo "./configure --enable-autogen $@" 13 | ./configure --enable-autogen $@ 14 | if [ $? -ne 0 ]; then 15 | echo "Error $? in ./configure" 16 | exit 1 17 | fi 18 | -------------------------------------------------------------------------------- /PSS_ASIO/Common/SendBuffer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | class CSendBuffer 6 | { 7 | public: 8 | std::string data_; 9 | std::size_t buffer_length_ = 0; 10 | 11 | void set(const char* _buffer, std::size_t _buffer_length) 12 | { 13 | data_.append(_buffer, _buffer_length); 14 | buffer_length_ = _buffer_length; 15 | } 16 | }; -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/spin.c: -------------------------------------------------------------------------------- 1 | #include "test/jemalloc_test.h" 2 | 3 | #include "jemalloc/internal/spin.h" 4 | 5 | TEST_BEGIN(test_spin) { 6 | spin_t spinner = SPIN_INITIALIZER; 7 | 8 | for (unsigned i = 0; i < 100; i++) { 9 | spin_adaptive(&spinner); 10 | } 11 | } 12 | TEST_END 13 | 14 | int 15 | main(void) { 16 | return test( 17 | test_spin); 18 | } 19 | -------------------------------------------------------------------------------- /PSS_ASIO_CLIENT/Common/SendBuffer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | class CSendBuffer 6 | { 7 | public: 8 | std::string data_; 9 | std::size_t buffer_length_ = 0; 10 | 11 | void set(const char* _buffer, std::size_t _buffer_length) 12 | { 13 | data_.append(_buffer, _buffer_length); 14 | buffer_length_ = _buffer_length; 15 | } 16 | }; -------------------------------------------------------------------------------- /third_include/jemalloc/test/include/test/jemalloc_test_defs.h.in: -------------------------------------------------------------------------------- 1 | #include "jemalloc/internal/jemalloc_internal_defs.h" 2 | #include "jemalloc/internal/jemalloc_internal_decls.h" 3 | 4 | /* 5 | * For use by SFMT. configure.ac doesn't actually define HAVE_SSE2 because its 6 | * dependencies are notoriously unportable in practice. 7 | */ 8 | #undef HAVE_SSE2 9 | #undef HAVE_ALTIVEC 10 | -------------------------------------------------------------------------------- /third_include/jemalloc/scripts/linux/before_install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -ev 4 | 5 | if [[ "$TRAVIS_OS_NAME" != "linux" ]]; then 6 | echo "Incorrect \$TRAVIS_OS_NAME: expected linux, got $TRAVIS_OS_NAME" 7 | exit 1 8 | fi 9 | 10 | if [[ "$CROSS_COMPILE_32BIT" == "yes" ]]; then 11 | sudo apt-get update 12 | sudo apt-get -y install gcc-multilib g++-multilib 13 | fi 14 | -------------------------------------------------------------------------------- /third_include/spdlog/version.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #define SPDLOG_VER_MAJOR 1 7 | #define SPDLOG_VER_MINOR 11 8 | #define SPDLOG_VER_PATCH 0 9 | 10 | #define SPDLOG_VERSION (SPDLOG_VER_MAJOR * 10000 + SPDLOG_VER_MINOR * 100 + SPDLOG_VER_PATCH) 11 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/include/test/timer.h: -------------------------------------------------------------------------------- 1 | /* Simple timer, for use in benchmark reporting. */ 2 | 3 | typedef struct { 4 | nstime_t t0; 5 | nstime_t t1; 6 | } timedelta_t; 7 | 8 | void timer_start(timedelta_t *timer); 9 | void timer_stop(timedelta_t *timer); 10 | uint64_t timer_usec(const timedelta_t *timer); 11 | void timer_ratio(timedelta_t *a, timedelta_t *b, char *buf, size_t buflen); 12 | -------------------------------------------------------------------------------- /NOTES-WINDOWS.md: -------------------------------------------------------------------------------- 1 | Notes for Windows platforms 2 | =========================== 3 | 4 | You can use VS2019 to complete the compilation on windows. 5 | 6 | Main server compilation path: 7 | \PSS_ASIO\PSS_ASIO.sln 8 | 9 | Packet parsing plugin compilation: 10 | PacketParse_Inferface\PacketParse_Interface.sln 11 | 12 | Logic plugin compilation path: 13 | Module_Logic\Test_Logic\Test_Logic.sln 14 | -------------------------------------------------------------------------------- /third_include/spdlog/fwd.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | namespace spdlog { 7 | class logger; 8 | class formatter; 9 | 10 | namespace sinks { 11 | class sink; 12 | } 13 | 14 | namespace level { 15 | enum level_enum : int; 16 | } 17 | 18 | } // namespace spdlog 19 | -------------------------------------------------------------------------------- /tests/test_pss_asio.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ..\Build\Windows 5 | WindowsLocalDebugger 6 | 7 | -------------------------------------------------------------------------------- /third_include/jemalloc/include/jemalloc/internal/slab_data.h: -------------------------------------------------------------------------------- 1 | #ifndef JEMALLOC_INTERNAL_SLAB_DATA_H 2 | #define JEMALLOC_INTERNAL_SLAB_DATA_H 3 | 4 | #include "jemalloc/internal/bitmap.h" 5 | 6 | typedef struct slab_data_s slab_data_t; 7 | struct slab_data_s { 8 | /* Per region allocated/deallocated bitmap. */ 9 | bitmap_t bitmap[BITMAP_GROUPS_MAX]; 10 | }; 11 | 12 | #endif /* JEMALLOC_INTERNAL_SLAB_DATA_H */ 13 | -------------------------------------------------------------------------------- /third_include/openssl/ecdh.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #include 11 | -------------------------------------------------------------------------------- /third_include/openssl/ecdsa.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #include 11 | -------------------------------------------------------------------------------- /third_include/jemalloc/include/jemalloc/internal/extent_mmap.h: -------------------------------------------------------------------------------- 1 | #ifndef JEMALLOC_INTERNAL_EXTENT_MMAP_EXTERNS_H 2 | #define JEMALLOC_INTERNAL_EXTENT_MMAP_EXTERNS_H 3 | 4 | extern bool opt_retain; 5 | 6 | void *extent_alloc_mmap(void *new_addr, size_t size, size_t alignment, 7 | bool *zero, bool *commit); 8 | bool extent_dalloc_mmap(void *addr, size_t size); 9 | 10 | #endif /* JEMALLOC_INTERNAL_EXTENT_MMAP_EXTERNS_H */ 11 | -------------------------------------------------------------------------------- /PSS_ASIO_CLIENT/PSS_ASIO_CLIENT.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ..\Build\Windows\ 5 | WindowsLocalDebugger 6 | 7 | -------------------------------------------------------------------------------- /PSS_PLUGIN_LOGIC_MAKER/PSS_PLUGIN_LOGIC_MAKER.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ./Build 5 | WindowsLocalDebugger 6 | 7 | -------------------------------------------------------------------------------- /third_include/jemalloc/jemalloc.pc: -------------------------------------------------------------------------------- 1 | prefix=/usr/local 2 | exec_prefix=/usr/local 3 | libdir=${exec_prefix}/lib 4 | includedir=${prefix}/include 5 | install_suffix= 6 | 7 | Name: jemalloc 8 | Description: A general purpose malloc(3) implementation that emphasizes fragmentation avoidance and scalable concurrency support. 9 | URL: http://jemalloc.net/ 10 | Version: 0.0.0_0 11 | Cflags: -I${includedir} 12 | Libs: -L${libdir} -ljemalloc${install_suffix} 13 | -------------------------------------------------------------------------------- /PSS_PLUGIN_LOGIC_MAKER/Build/template/template_Command.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | #include "IFrameObject.h" 5 | [include file] 6 | 7 | //define command id 8 | [command id define] 9 | 10 | class C[command class name] 11 | { 12 | public: 13 | void Init(ISessionService* session_service); 14 | 15 | [command logic function define] 16 | 17 | private: 18 | ISessionService* session_service_ = nullptr; 19 | [do message logic] 20 | }; 21 | 22 | -------------------------------------------------------------------------------- /third_include/openssl/asn1_mac.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #error "This file is obsolete; please update your software." 11 | -------------------------------------------------------------------------------- /Build/Windows/dh2048.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN DH PARAMETERS----- 2 | MIIBCAKCAQEAsC7/ndo7w6BbWoMgop5Ga8q7kkZA5mQYrfPyhKuxEvYj92KAFWyH 3 | DnBaAIGuu7vSkgZeBj2v/ywobf2BtrrzG9IXAWKb/00/5+OUCunD8BJqMblBIUs6 4 | ag+MdMm6FhAvz8lKiVwYkN8eMNbliBXlj0VRtHDtMNig5cEvr3KD4qcN7GZg6udo 5 | szKvLyzC1y7zXpG/QJ4hWJxw0YiPvzy21v/jIJMEeWfhI4hkuDaU3+rePftQwLm7 6 | 3/ZKc6K4tECkfW8rBucV9eYbzPcncsMwfmp7e0pR36zO0cFiza4Mtfs0eg6aCn5L 7 | FzeHa/qz/YxIUqk/OikCiFG8dEE2Kw+lswIBAg== 8 | -----END DH PARAMETERS----- 9 | -------------------------------------------------------------------------------- /jemalloc.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | ##################################### 3 | #make jemalloc 4 | ##################################### 5 | 6 | crtdir=$(pwd) 7 | libdir=${crtdir}/Build/Linux/commonlib 8 | mkdir -p ${libdir} 9 | 10 | if [ ! -f ${libdir}/libjemalloc.so ];then 11 | cd ./third_include/jemalloc 12 | ./autogen.sh 13 | ./configure 14 | make 15 | cp lib/libjemalloc.so.2 lib/libjemalloc.so ${libdir} 16 | #make clean 17 | cd ${crtdir} 18 | fi 19 | -------------------------------------------------------------------------------- /third_include/jemalloc/scripts/freebsd/before_script.sh: -------------------------------------------------------------------------------- 1 | #!/bin/tcsh 2 | 3 | autoconf 4 | # We don't perfectly track freebsd stdlib.h definitions. This is fine when 5 | # we count as a system header, but breaks otherwise, like during these 6 | # tests. 7 | ./configure --with-jemalloc-prefix=ci_ ${COMPILER_FLAGS:+ CC="$CC $COMPILER_FLAGS" CXX="$CXX $COMPILER_FLAGS"} $CONFIGURE_FLAGS 8 | JE_NCPUS=`sysctl -n kern.smp.cpus` 9 | gmake -j${JE_NCPUS} 10 | gmake -j${JE_NCPUS} tests 11 | -------------------------------------------------------------------------------- /third_include/jemalloc/doc/stylesheet.xsl: -------------------------------------------------------------------------------- 1 | 2 | ansi 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /third_include/jemalloc/src/test_hooks.c: -------------------------------------------------------------------------------- 1 | #include "jemalloc/internal/jemalloc_preamble.h" 2 | 3 | /* 4 | * The hooks are a little bit screwy -- they're not genuinely exported in the 5 | * sense that we want them available to end-users, but we do want them visible 6 | * from outside the generated library, so that we can use them in test code. 7 | */ 8 | JEMALLOC_EXPORT 9 | void (*test_hooks_arena_new_hook)() = NULL; 10 | 11 | JEMALLOC_EXPORT 12 | void (*test_hooks_libc_hook)() = NULL; 13 | -------------------------------------------------------------------------------- /third_include/jemalloc/src/ticker.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import math 4 | 5 | # Must match TICKER_GEOM_NBITS 6 | lg_table_size = 6 7 | table_size = 2**lg_table_size 8 | byte_max = 255 9 | mul = math.floor(-byte_max/math.log(1 / table_size)) 10 | values = [round(-mul * math.log(i / table_size)) 11 | for i in range(1, table_size+1)] 12 | print("mul =", mul) 13 | print("values:") 14 | for i in range(table_size // 8): 15 | print(", ".join((str(x) for x in values[i*8 : i*8 + 8]))) 16 | -------------------------------------------------------------------------------- /PSS_ASIO/Common/IoListManager.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | //规范化接口服务器指针 4 | //add by freeeyes 5 | 6 | #include "define.h" 7 | #include "IoNetServer.h" 8 | 9 | class CIo_List_Manager 10 | { 11 | public: 12 | virtual void add_accept_net_io_event(string io_ip, io_port_type io_port, EM_CONNECT_IO_TYPE em_io_net_type, shared_ptr Io_Net_server) = 0; 13 | virtual void del_accept_net_io_event(string io_ip, io_port_type io_port, EM_CONNECT_IO_TYPE em_io_net_type) = 0; 14 | }; -------------------------------------------------------------------------------- /third_include/openssl/pem2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1999-2018 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_PEM2_H 11 | # define HEADER_PEM2_H 12 | # include 13 | #endif 14 | -------------------------------------------------------------------------------- /third_include/asio/unyield.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // unyield.hpp 3 | // ~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifdef reenter 12 | # undef reenter 13 | #endif 14 | 15 | #ifdef yield 16 | # undef yield 17 | #endif 18 | 19 | #ifdef fork 20 | # undef fork 21 | #endif 22 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/include/test/jemalloc_test_defs.h: -------------------------------------------------------------------------------- 1 | /* test/include/test/jemalloc_test_defs.h. Generated from jemalloc_test_defs.h.in by configure. */ 2 | #include "jemalloc/internal/jemalloc_internal_defs.h" 3 | #include "jemalloc/internal/jemalloc_internal_decls.h" 4 | 5 | /* 6 | * For use by SFMT. configure.ac doesn't actually define HAVE_SSE2 because its 7 | * dependencies are notoriously unportable in practice. 8 | */ 9 | /* #undef HAVE_SSE2 */ 10 | /* #undef HAVE_ALTIVEC */ 11 | -------------------------------------------------------------------------------- /PSS_ASIO/Common/ConnectCounter.h: -------------------------------------------------------------------------------- 1 | #ifndef _PSS_CCONNECT_COUNTER_H 2 | #define _PSS_CCONNECT_COUNTER_H 3 | 4 | #include "define.h" 5 | #include "singleton.h" 6 | #include 7 | 8 | //全局计数器 9 | //用于所有不同类型的Connect的id生成,保证唯一。 10 | //add by freeeyes 11 | 12 | class CConnectCounter 13 | { 14 | public: 15 | uint32 CreateCounter(); //得到唯一的新ID 16 | 17 | private: 18 | std::atomic count_index{0}; 19 | }; 20 | 21 | using App_ConnectCounter = PSS_singleton; 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/include/test/bgthd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Shared utility for checking if background_thread is enabled, which affects 3 | * the purging behavior and assumptions in some tests. 4 | */ 5 | 6 | static inline bool 7 | is_background_thread_enabled(void) { 8 | bool enabled; 9 | size_t sz = sizeof(bool); 10 | int ret = mallctl("background_thread", (void *)&enabled, &sz, NULL,0); 11 | if (ret == ENOENT) { 12 | return false; 13 | } 14 | assert_d_eq(ret, 0, "Unexpected mallctl error"); 15 | 16 | return enabled; 17 | } 18 | -------------------------------------------------------------------------------- /third_include/jemalloc/jemalloc.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | install_suffix=@install_suffix@ 6 | 7 | Name: jemalloc 8 | Description: A general purpose malloc(3) implementation that emphasizes fragmentation avoidance and scalable concurrency support. 9 | URL: http://jemalloc.net/ 10 | Version: @jemalloc_version_major@.@jemalloc_version_minor@.@jemalloc_version_bugfix@_@jemalloc_version_nrev@ 11 | Cflags: -I${includedir} 12 | Libs: -L${libdir} -ljemalloc${install_suffix} 13 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/include/test/san.h: -------------------------------------------------------------------------------- 1 | #if defined(JEMALLOC_UAF_DETECTION) || defined(JEMALLOC_DEBUG) 2 | # define TEST_SAN_UAF_ALIGN_ENABLE "lg_san_uaf_align:12" 3 | # define TEST_SAN_UAF_ALIGN_DISABLE "lg_san_uaf_align:-1" 4 | #else 5 | # define TEST_SAN_UAF_ALIGN_ENABLE "" 6 | # define TEST_SAN_UAF_ALIGN_DISABLE "" 7 | #endif 8 | 9 | static inline bool 10 | extent_is_guarded(tsdn_t *tsdn, void *ptr) { 11 | edata_t *edata = emap_edata_lookup(tsdn, &arena_emap_global, ptr); 12 | return edata_guarded_get(edata); 13 | } 14 | 15 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/integration/cpp/infallible_new_false.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "test/jemalloc_test.h" 4 | 5 | TEST_BEGIN(test_failing_alloc) { 6 | bool saw_exception = false; 7 | try { 8 | /* Too big of an allocation to succeed. */ 9 | void *volatile ptr = ::operator new((size_t)-1); 10 | (void)ptr; 11 | } catch (...) { 12 | saw_exception = true; 13 | } 14 | expect_true(saw_exception, "Didn't get a failure"); 15 | } 16 | TEST_END 17 | 18 | int 19 | main(void) { 20 | return test( 21 | test_failing_alloc); 22 | } 23 | 24 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/integration/cpp/basic.cpp: -------------------------------------------------------------------------------- 1 | #include "test/jemalloc_test.h" 2 | 3 | TEST_BEGIN(test_basic) { 4 | auto foo = new long(4); 5 | expect_ptr_not_null(foo, "Unexpected new[] failure"); 6 | delete foo; 7 | // Test nullptr handling. 8 | foo = nullptr; 9 | delete foo; 10 | 11 | auto bar = new long; 12 | expect_ptr_not_null(bar, "Unexpected new failure"); 13 | delete bar; 14 | // Test nullptr handling. 15 | bar = nullptr; 16 | delete bar; 17 | } 18 | TEST_END 19 | 20 | int 21 | main() { 22 | return test( 23 | test_basic); 24 | } 25 | -------------------------------------------------------------------------------- /third_include/spdlog/formatter.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | namespace spdlog { 10 | 11 | class formatter 12 | { 13 | public: 14 | virtual ~formatter() = default; 15 | virtual void format(const details::log_msg &msg, memory_buf_t &dest) = 0; 16 | virtual std::unique_ptr clone() const = 0; 17 | }; 18 | } // namespace spdlog 19 | -------------------------------------------------------------------------------- /third_include/asio/yield.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // yield.hpp 3 | // ~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #include "coroutine.hpp" 12 | 13 | #ifndef reenter 14 | # define reenter(c) ASIO_CORO_REENTER(c) 15 | #endif 16 | 17 | #ifndef yield 18 | # define yield ASIO_CORO_YIELD 19 | #endif 20 | 21 | #ifndef fork 22 | # define fork ASIO_CORO_FORK 23 | #endif 24 | -------------------------------------------------------------------------------- /third_include/jemalloc/include/msvc_compat/C99/stdbool.h: -------------------------------------------------------------------------------- 1 | #ifndef stdbool_h 2 | #define stdbool_h 3 | 4 | #include 5 | 6 | /* MSVC doesn't define _Bool or bool in C, but does have BOOL */ 7 | /* Note this doesn't pass autoconf's test because (bool) 0.5 != true */ 8 | /* Clang-cl uses MSVC headers, so needs msvc_compat, but has _Bool as 9 | * a built-in type. */ 10 | #ifndef __clang__ 11 | typedef BOOL _Bool; 12 | #endif 13 | 14 | #define bool _Bool 15 | #define true 1 16 | #define false 0 17 | 18 | #define __bool_true_false_are_defined 1 19 | 20 | #endif /* stdbool_h */ 21 | -------------------------------------------------------------------------------- /Common/IIoBridge.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "define.h" 4 | 5 | //add by freeeyes 6 | //这里我想了良久,最后决定对IO桥接的效率放在第一位。 7 | //那么这个接口应该交付给PacketParse去处理,connect和disconnect 8 | 9 | //实现IO桥接的虚类 10 | class IIoBridge 11 | { 12 | public: 13 | virtual bool add_session_io_mapping(const _ClientIPInfo& from_io, EM_CONNECT_IO_TYPE from_io_type, const _ClientIPInfo& to_io, EM_CONNECT_IO_TYPE to_io_type, ENUM_IO_BRIDGE_TYPE bridge_type = ENUM_IO_BRIDGE_TYPE::IO_BRIDGE_BATH) = 0; 14 | virtual bool delete_session_io_mapping(const _ClientIPInfo& from_io, EM_CONNECT_IO_TYPE from_io_type) = 0; 15 | }; 16 | -------------------------------------------------------------------------------- /PSS_ASIO/Common/ServerService.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | //服务主入口 4 | //add by freeeyes 5 | #include "QueueService.h" 6 | #include "serverconfig.h" 7 | #include "CommunicationService.h" 8 | #include "SessionService.h" 9 | #include "NetSvrManager.h" 10 | 11 | #if PSS_PLATFORM == PLATFORM_WIN 12 | #include 13 | #endif 14 | 15 | class CServerService 16 | { 17 | public: 18 | bool init_service(const std::string& pss_config_file_name = config_file_name); 19 | void close_service(); 20 | void stop_service(); 21 | }; 22 | 23 | using App_ServerService = PSS_singleton; 24 | -------------------------------------------------------------------------------- /third_include/jemalloc/include/jemalloc/internal/bin_types.h: -------------------------------------------------------------------------------- 1 | #ifndef JEMALLOC_INTERNAL_BIN_TYPES_H 2 | #define JEMALLOC_INTERNAL_BIN_TYPES_H 3 | 4 | #include "jemalloc/internal/sc.h" 5 | 6 | #define BIN_SHARDS_MAX (1 << EDATA_BITS_BINSHARD_WIDTH) 7 | #define N_BIN_SHARDS_DEFAULT 1 8 | 9 | /* Used in TSD static initializer only. Real init in arena_bind(). */ 10 | #define TSD_BINSHARDS_ZERO_INITIALIZER {{UINT8_MAX}} 11 | 12 | typedef struct tsd_binshards_s tsd_binshards_t; 13 | struct tsd_binshards_s { 14 | uint8_t binshard[SC_NBINS]; 15 | }; 16 | 17 | #endif /* JEMALLOC_INTERNAL_BIN_TYPES_H */ 18 | -------------------------------------------------------------------------------- /third_include/jemalloc/include/jemalloc/jemalloc_rename.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | public_symbols_txt=$1 4 | 5 | cat < recv_packet, std::shared_ptr send_packet); 17 | 18 | void close(); 19 | 20 | private: 21 | command_to_module_function command_to_module_function_; 22 | }; -------------------------------------------------------------------------------- /third_include/jemalloc/include/jemalloc/jemalloc.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | objroot=$1 4 | 5 | cat <= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/io_context.hpp" 19 | 20 | #endif // ASIO_TS_IO_CONTEXT_HPP 21 | -------------------------------------------------------------------------------- /third_include/jemalloc/include/jemalloc/internal/hpa_hooks.h: -------------------------------------------------------------------------------- 1 | #ifndef JEMALLOC_INTERNAL_HPA_HOOKS_H 2 | #define JEMALLOC_INTERNAL_HPA_HOOKS_H 3 | 4 | typedef struct hpa_hooks_s hpa_hooks_t; 5 | struct hpa_hooks_s { 6 | void *(*map)(size_t size); 7 | void (*unmap)(void *ptr, size_t size); 8 | void (*purge)(void *ptr, size_t size); 9 | void (*hugify)(void *ptr, size_t size); 10 | void (*dehugify)(void *ptr, size_t size); 11 | void (*curtime)(nstime_t *r_time, bool first_reading); 12 | uint64_t (*ms_since)(nstime_t *r_time); 13 | }; 14 | 15 | extern hpa_hooks_t hpa_hooks_default; 16 | 17 | #endif /* JEMALLOC_INTERNAL_HPA_HOOKS_H */ 18 | -------------------------------------------------------------------------------- /third_include/spdlog/fmt/xchar.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | // 8 | // include bundled or external copy of fmtlib's xchar support 9 | // 10 | 11 | #if !defined(SPDLOG_USE_STD_FORMAT) 12 | # if !defined(SPDLOG_FMT_EXTERNAL) 13 | # ifdef SPDLOG_HEADER_ONLY 14 | # ifndef FMT_HEADER_ONLY 15 | # define FMT_HEADER_ONLY 16 | # endif 17 | # endif 18 | # include 19 | # else 20 | # include 21 | # endif 22 | #endif 23 | -------------------------------------------------------------------------------- /third_include/spdlog/fmt/chrono.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | // 8 | // include bundled or external copy of fmtlib's chrono support 9 | // 10 | 11 | #if !defined(SPDLOG_USE_STD_FORMAT) 12 | # if !defined(SPDLOG_FMT_EXTERNAL) 13 | # ifdef SPDLOG_HEADER_ONLY 14 | # ifndef FMT_HEADER_ONLY 15 | # define FMT_HEADER_ONLY 16 | # endif 17 | # endif 18 | # include 19 | # else 20 | # include 21 | # endif 22 | #endif 23 | -------------------------------------------------------------------------------- /third_include/spdlog/fmt/ostr.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | // 8 | // include bundled or external copy of fmtlib's ostream support 9 | // 10 | 11 | #if !defined(SPDLOG_USE_STD_FORMAT) 12 | # if !defined(SPDLOG_FMT_EXTERNAL) 13 | # ifdef SPDLOG_HEADER_ONLY 14 | # ifndef FMT_HEADER_ONLY 15 | # define FMT_HEADER_ONLY 16 | # endif 17 | # endif 18 | # include 19 | # else 20 | # include 21 | # endif 22 | #endif 23 | -------------------------------------------------------------------------------- /third_include/spdlog/fmt/ranges.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | // 8 | // include bundled or external copy of fmtlib's ranges support 9 | // 10 | 11 | #if !defined(SPDLOG_USE_STD_FORMAT) 12 | # if !defined(SPDLOG_FMT_EXTERNAL) 13 | # ifdef SPDLOG_HEADER_ONLY 14 | # ifndef FMT_HEADER_ONLY 15 | # define FMT_HEADER_ONLY 16 | # endif 17 | # endif 18 | # include 19 | # else 20 | # include 21 | # endif 22 | #endif 23 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/zero_realloc_abort.c: -------------------------------------------------------------------------------- 1 | #include "test/jemalloc_test.h" 2 | 3 | #include 4 | 5 | static bool abort_called = false; 6 | 7 | void set_abort_called() { 8 | abort_called = true; 9 | }; 10 | 11 | TEST_BEGIN(test_realloc_abort) { 12 | abort_called = false; 13 | safety_check_set_abort(&set_abort_called); 14 | void *ptr = mallocx(42, 0); 15 | expect_ptr_not_null(ptr, "Unexpected mallocx error"); 16 | ptr = realloc(ptr, 0); 17 | expect_true(abort_called, "Realloc with zero size didn't abort"); 18 | } 19 | TEST_END 20 | 21 | int 22 | main(void) { 23 | return test( 24 | test_realloc_abort); 25 | } 26 | 27 | -------------------------------------------------------------------------------- /third_include/jemalloc/include/jemalloc/internal/prof_stats.h: -------------------------------------------------------------------------------- 1 | #ifndef JEMALLOC_INTERNAL_PROF_STATS_H 2 | #define JEMALLOC_INTERNAL_PROF_STATS_H 3 | 4 | typedef struct prof_stats_s prof_stats_t; 5 | struct prof_stats_s { 6 | uint64_t req_sum; 7 | uint64_t count; 8 | }; 9 | 10 | extern malloc_mutex_t prof_stats_mtx; 11 | 12 | void prof_stats_inc(tsd_t *tsd, szind_t ind, size_t size); 13 | void prof_stats_dec(tsd_t *tsd, szind_t ind, size_t size); 14 | void prof_stats_get_live(tsd_t *tsd, szind_t ind, prof_stats_t *stats); 15 | void prof_stats_get_accum(tsd_t *tsd, szind_t ind, prof_stats_t *stats); 16 | 17 | #endif /* JEMALLOC_INTERNAL_PROF_STATS_H */ 18 | -------------------------------------------------------------------------------- /third_include/spdlog/fmt/compile.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | // 8 | // include bundled or external copy of fmtlib's compile-time support 9 | // 10 | 11 | #if !defined(SPDLOG_USE_STD_FORMAT) 12 | # if !defined(SPDLOG_FMT_EXTERNAL) 13 | # ifdef SPDLOG_HEADER_ONLY 14 | # ifndef FMT_HEADER_ONLY 15 | # define FMT_HEADER_ONLY 16 | # endif 17 | # endif 18 | # include 19 | # else 20 | # include 21 | # endif 22 | #endif 23 | -------------------------------------------------------------------------------- /third_include/asio/detail/limits.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/limits.hpp 3 | // ~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_LIMITS_HPP 12 | #define ASIO_DETAIL_LIMITS_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include 20 | 21 | #endif // ASIO_DETAIL_LIMITS_HPP 22 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/include/test/mtx.h: -------------------------------------------------------------------------------- 1 | /* 2 | * mtx is a slightly simplified version of malloc_mutex. This code duplication 3 | * is unfortunate, but there are allocator bootstrapping considerations that 4 | * would leak into the test infrastructure if malloc_mutex were used directly 5 | * in tests. 6 | */ 7 | 8 | typedef struct { 9 | #ifdef _WIN32 10 | CRITICAL_SECTION lock; 11 | #elif (defined(JEMALLOC_OS_UNFAIR_LOCK)) 12 | os_unfair_lock lock; 13 | #else 14 | pthread_mutex_t lock; 15 | #endif 16 | } mtx_t; 17 | 18 | bool mtx_init(mtx_t *mtx); 19 | void mtx_fini(mtx_t *mtx); 20 | void mtx_lock(mtx_t *mtx); 21 | void mtx_unlock(mtx_t *mtx); 22 | -------------------------------------------------------------------------------- /third_include/asio/io_service_strand.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // io_service_strand.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IO_SERVICE_STRAND_HPP 12 | #define ASIO_IO_SERVICE_STRAND_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/io_context_strand.hpp" 19 | 20 | #endif // ASIO_IO_SERVICE_STRAND_HPP 21 | -------------------------------------------------------------------------------- /third_include/jemalloc/msvc/ReadMe.txt: -------------------------------------------------------------------------------- 1 | 2 | How to build jemalloc for Windows 3 | ================================= 4 | 5 | 1. Install Cygwin with at least the following packages: 6 | * autoconf 7 | * autogen 8 | * gawk 9 | * grep 10 | * sed 11 | 12 | 2. Install Visual Studio 2015 or 2017 with Visual C++ 13 | 14 | 3. Add Cygwin\bin to the PATH environment variable 15 | 16 | 4. Open "x64 Native Tools Command Prompt for VS 2017" 17 | (note: x86/x64 doesn't matter at this point) 18 | 19 | 5. Generate header files: 20 | sh -c "CC=cl ./autogen.sh" 21 | 22 | 6. Now the project can be opened and built in Visual Studio: 23 | msvc\jemalloc_vc2017.sln 24 | -------------------------------------------------------------------------------- /third_include/openssl/ssl2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_SSL2_H 11 | # define HEADER_SSL2_H 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | # define SSL2_VERSION 0x0002 18 | 19 | # define SSL2_MT_CLIENT_HELLO 1 20 | 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | #endif 25 | -------------------------------------------------------------------------------- /PacketParse_Http/PacketParse_Http.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ..\Build\Windows\ 5 | WindowsLocalDebugger 6 | 7 | 8 | ..\Build\Windows\ 9 | WindowsLocalDebugger 10 | 11 | -------------------------------------------------------------------------------- /third_include/jemalloc/include/jemalloc/internal/public_unnamespace.h: -------------------------------------------------------------------------------- 1 | #undef je_aligned_alloc 2 | #undef je_calloc 3 | #undef je_dallocx 4 | #undef je_free 5 | #undef je_mallctl 6 | #undef je_mallctlbymib 7 | #undef je_mallctlnametomib 8 | #undef je_malloc 9 | #undef je_malloc_conf 10 | #undef je_malloc_conf_2_conf_harder 11 | #undef je_malloc_message 12 | #undef je_malloc_stats_print 13 | #undef je_malloc_usable_size 14 | #undef je_mallocx 15 | #undef je_smallocx_000000missin 16 | #undef je_nallocx 17 | #undef je_posix_memalign 18 | #undef je_rallocx 19 | #undef je_realloc 20 | #undef je_sallocx 21 | #undef je_sdallocx 22 | #undef je_xallocx 23 | #undef je_memalign 24 | #undef je_valloc 25 | -------------------------------------------------------------------------------- /Module_Logic/Test_Logic/Test_Logic.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ..\..\Build\Windows 5 | WindowsLocalDebugger 6 | 7 | 8 | ..\..\Build\Windows 9 | WindowsLocalDebugger 10 | 11 | -------------------------------------------------------------------------------- /PacketParse_Interface/PacketParse_Interface.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ..\Build\Windows\ 5 | WindowsLocalDebugger 6 | 7 | 8 | ..\Build\Windows\ 9 | WindowsLocalDebugger 10 | 11 | -------------------------------------------------------------------------------- /Common/IFrameObject.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "define.h" 4 | #include "ISessionService.h" 5 | 6 | //插件内需要框架需要使用的对象 7 | 8 | //同步异步执行逻辑标记 9 | enum class EM_LOGIC_RUN_STATE 10 | { 11 | LOGIC_RUN_SYNCHRONOUS = 0, //同步执行 12 | LOGIC_RUN_ASYNHRONOUS, //异步执行 13 | }; 14 | 15 | class IFrame_Object 16 | { 17 | public: 18 | virtual bool Regedit_command(uint16 command_id, EM_LOGIC_RUN_STATE em_logic_state = EM_LOGIC_RUN_STATE::LOGIC_RUN_ASYNHRONOUS) = 0; 19 | virtual bool Regedit_command(uint16 command_id, Logic_message_dispose_fn logic_fn, EM_LOGIC_RUN_STATE em_logic_state = EM_LOGIC_RUN_STATE::LOGIC_RUN_ASYNHRONOUS) = 0; 20 | virtual ISessionService* get_session_service() = 0; 21 | }; -------------------------------------------------------------------------------- /third_include/jemalloc/include/jemalloc/internal/public_symbols.txt: -------------------------------------------------------------------------------- 1 | aligned_alloc:aligned_alloc 2 | calloc:calloc 3 | dallocx:dallocx 4 | free:free 5 | mallctl:mallctl 6 | mallctlbymib:mallctlbymib 7 | mallctlnametomib:mallctlnametomib 8 | malloc:malloc 9 | malloc_conf:malloc_conf 10 | malloc_conf_2_conf_harder:malloc_conf_2_conf_harder 11 | malloc_message:malloc_message 12 | malloc_stats_print:malloc_stats_print 13 | malloc_usable_size:malloc_usable_size 14 | mallocx:mallocx 15 | smallocx_000000missin:smallocx_000000missin 16 | nallocx:nallocx 17 | posix_memalign:posix_memalign 18 | rallocx:rallocx 19 | realloc:realloc 20 | sallocx:sallocx 21 | sdallocx:sdallocx 22 | xallocx:xallocx 23 | memalign:memalign 24 | valloc:valloc 25 | -------------------------------------------------------------------------------- /tests/test_Iotoio.cpp: -------------------------------------------------------------------------------- 1 | #include "test_Iotoio.h" 2 | 3 | int run_test_iotoio() 4 | { 5 | int ret = 0; 6 | CIotoIo io_to_io; 7 | _ClientIPInfo from_io; 8 | EM_CONNECT_IO_TYPE from_io_type = EM_CONNECT_IO_TYPE::CONNECT_IO_TCP; 9 | _ClientIPInfo to_io; 10 | EM_CONNECT_IO_TYPE to_io_type = EM_CONNECT_IO_TYPE::CONNECT_IO_UDP; 11 | 12 | from_io.m_strClientIP = "127.0.0.1"; 13 | from_io.m_u2Port = 10002; 14 | to_io.m_strClientIP = "127.0.0.1"; 15 | to_io.m_u2Port = 10003; 16 | 17 | io_to_io.add_session_io_mapping(from_io, from_io_type, to_io, to_io_type, ENUM_IO_BRIDGE_TYPE::IO_BRIDGE_BATH); 18 | 19 | io_to_io.delete_session_io_mapping(to_io, to_io_type); 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /third_include/spdlog/fmt/std.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | // 8 | // include bundled or external copy of fmtlib's std support (for formatting e.g. std::filesystem::path, std::thread::id, std::monostate, 9 | // std::variant, ...) 10 | // 11 | 12 | #if !defined(SPDLOG_USE_STD_FORMAT) 13 | # if !defined(SPDLOG_FMT_EXTERNAL) 14 | # ifdef SPDLOG_HEADER_ONLY 15 | # ifndef FMT_HEADER_ONLY 16 | # define FMT_HEADER_ONLY 17 | # endif 18 | # endif 19 | # include 20 | # else 21 | # include 22 | # endif 23 | #endif 24 | -------------------------------------------------------------------------------- /PSS_ASIO/PSS_ASIO.cpp: -------------------------------------------------------------------------------- 1 | // PSS_ASIO.cpp : 主工程 2 | // 3 | 4 | #include "ServerService.h" 5 | #include 6 | #include 7 | #include 8 | #if PSS_PLATFORM != PLATFORM_WIN 9 | #include 10 | #include 11 | #endif 12 | 13 | int main(int argc, char* argv[]) 14 | { 15 | //读取配置文件参数 16 | if (argc > 2) 17 | { 18 | log_screen("pass asio config file param error."); 19 | return 0; 20 | } 21 | 22 | //如果存在配置文件名称,则读取指定的配置文件 23 | if (argc == 2) 24 | { 25 | App_ServerService::instance()->init_service(argv[1]); 26 | } 27 | else 28 | { 29 | App_ServerService::instance()->init_service("server_config.json"); 30 | } 31 | return 0; 32 | } 33 | -------------------------------------------------------------------------------- /third_include/asio/ts/buffer.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ts/buffer.hpp 3 | // ~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_TS_BUFFER_HPP 12 | #define ASIO_TS_BUFFER_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/buffer.hpp" 19 | #include "asio/completion_condition.hpp" 20 | #include "asio/read.hpp" 21 | #include "asio/write.hpp" 22 | #include "asio/read_until.hpp" 23 | 24 | #endif // ASIO_TS_BUFFER_HPP 25 | -------------------------------------------------------------------------------- /PSS_ASIO/PSS_ASIO.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ..\Build\Windows\ 5 | WindowsLocalDebugger 6 | 7 | 8 | 9 | 10 | ..\Build\Windows\ 11 | WindowsLocalDebugger 12 | 13 | -------------------------------------------------------------------------------- /third_include/asio/buffered_stream_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // buffered_stream_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_BUFFERED_STREAM_FWD_HPP 12 | #define ASIO_BUFFERED_STREAM_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | namespace asio { 19 | 20 | template 21 | class buffered_stream; 22 | 23 | } // namespace asio 24 | 25 | #endif // ASIO_BUFFERED_STREAM_FWD_HPP 26 | -------------------------------------------------------------------------------- /third_include/jemalloc/include/jemalloc/internal/prof_log.h: -------------------------------------------------------------------------------- 1 | #ifndef JEMALLOC_INTERNAL_PROF_LOG_H 2 | #define JEMALLOC_INTERNAL_PROF_LOG_H 3 | 4 | #include "jemalloc/internal/mutex.h" 5 | 6 | extern malloc_mutex_t log_mtx; 7 | 8 | void prof_try_log(tsd_t *tsd, size_t usize, prof_info_t *prof_info); 9 | bool prof_log_init(tsd_t *tsdn); 10 | 11 | /* Used in unit tests. */ 12 | size_t prof_log_bt_count(void); 13 | size_t prof_log_alloc_count(void); 14 | size_t prof_log_thr_count(void); 15 | bool prof_log_is_logging(void); 16 | bool prof_log_rep_check(void); 17 | void prof_log_dummy_set(bool new_value); 18 | 19 | bool prof_log_start(tsdn_t *tsdn, const char *filename); 20 | bool prof_log_stop(tsdn_t *tsdn); 21 | 22 | #endif /* JEMALLOC_INTERNAL_PROF_LOG_H */ 23 | -------------------------------------------------------------------------------- /third_include/asio/detail/cstddef.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/cstddef.hpp 3 | // ~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_CSTDDEF_HPP 12 | #define ASIO_DETAIL_CSTDDEF_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include 20 | 21 | namespace asio { 22 | 23 | using std::nullptr_t; 24 | 25 | } // namespace asio 26 | 27 | #endif // ASIO_DETAIL_CSTDDEF_HPP 28 | -------------------------------------------------------------------------------- /third_include/asio/version.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // version.hpp 3 | // ~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_VERSION_HPP 12 | #define ASIO_VERSION_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | // ASIO_VERSION % 100 is the sub-minor version 19 | // ASIO_VERSION / 100 % 1000 is the minor version 20 | // ASIO_VERSION / 100000 is the major version 21 | #define ASIO_VERSION 102802 // 1.28.2 22 | 23 | #endif // ASIO_VERSION_HPP 24 | -------------------------------------------------------------------------------- /PSS_ASIO/sonar-project.properties: -------------------------------------------------------------------------------- 1 | sonar.projectKey=ArkNX_PSS_ASIO 2 | sonar.organization=openark 3 | sonar.projectName=PSS_ASIO 4 | sonar.projectVersion=3.0 5 | 6 | sonar.sources=./ 7 | sonar.cfamily.build-wrapper-output=../bw-output 8 | sonar.cfamily.gcov.reportsPath=../Build/Linux 9 | sonar.cfamily.threads=2 10 | sonar.cfamily.cache.enabled=false 11 | sonar.coverageReportPaths=../coverage.xml 12 | 13 | sonar.exclusions=**TTySession/**,**Common/**,**TcpSession/TcpClientSession.cpp**,**UdpSession/UdpClientSession.cpp**,**UdpSession/KcpServer.cpp**,**Message/IotoIo.cpp**,**TcpSession/TcpSSLServer.cpp**,**TcpSession/TcpSSLSession.cpp**,**TcpSession/TcpSSLServer.h**,**TcpSession/TcpSSLSession.h**,**TcpSession/TcpSSLClientSession.h**,**TcpSession/TcpSSLClientSession.cpp** 14 | -------------------------------------------------------------------------------- /third_include/spdlog/details/periodic_worker-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifndef SPDLOG_HEADER_ONLY 7 | # include 8 | #endif 9 | 10 | namespace spdlog { 11 | namespace details { 12 | 13 | // stop the worker thread and join it 14 | SPDLOG_INLINE periodic_worker::~periodic_worker() 15 | { 16 | if (worker_thread_.joinable()) 17 | { 18 | { 19 | std::lock_guard lock(mutex_); 20 | active_ = false; 21 | } 22 | cv_.notify_one(); 23 | worker_thread_.join(); 24 | } 25 | } 26 | 27 | } // namespace details 28 | } // namespace spdlog 29 | -------------------------------------------------------------------------------- /third_include/asio/buffered_read_stream_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // buffered_read_stream_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_BUFFERED_READ_STREAM_FWD_HPP 12 | #define ASIO_BUFFERED_READ_STREAM_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | namespace asio { 19 | 20 | template 21 | class buffered_read_stream; 22 | 23 | } // namespace asio 24 | 25 | #endif // ASIO_BUFFERED_READ_STREAM_FWD_HPP 26 | -------------------------------------------------------------------------------- /third_include/jemalloc/include/jemalloc/internal/arena_inlines_a.h: -------------------------------------------------------------------------------- 1 | #ifndef JEMALLOC_INTERNAL_ARENA_INLINES_A_H 2 | #define JEMALLOC_INTERNAL_ARENA_INLINES_A_H 3 | 4 | static inline unsigned 5 | arena_ind_get(const arena_t *arena) { 6 | return arena->ind; 7 | } 8 | 9 | static inline void 10 | arena_internal_add(arena_t *arena, size_t size) { 11 | atomic_fetch_add_zu(&arena->stats.internal, size, ATOMIC_RELAXED); 12 | } 13 | 14 | static inline void 15 | arena_internal_sub(arena_t *arena, size_t size) { 16 | atomic_fetch_sub_zu(&arena->stats.internal, size, ATOMIC_RELAXED); 17 | } 18 | 19 | static inline size_t 20 | arena_internal_get(arena_t *arena) { 21 | return atomic_load_zu(&arena->stats.internal, ATOMIC_RELAXED); 22 | } 23 | 24 | #endif /* JEMALLOC_INTERNAL_ARENA_INLINES_A_H */ 25 | -------------------------------------------------------------------------------- /third_include/spdlog/details/console_globals.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | namespace spdlog { 10 | namespace details { 11 | 12 | struct console_mutex 13 | { 14 | using mutex_t = std::mutex; 15 | static mutex_t &mutex() 16 | { 17 | static mutex_t s_mutex; 18 | return s_mutex; 19 | } 20 | }; 21 | 22 | struct console_nullmutex 23 | { 24 | using mutex_t = null_mutex; 25 | static mutex_t &mutex() 26 | { 27 | static mutex_t s_mutex; 28 | return s_mutex; 29 | } 30 | }; 31 | } // namespace details 32 | } // namespace spdlog 33 | -------------------------------------------------------------------------------- /third_include/asio/buffered_write_stream_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // buffered_write_stream_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_BUFFERED_WRITE_STREAM_FWD_HPP 12 | #define ASIO_BUFFERED_WRITE_STREAM_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | namespace asio { 19 | 20 | template 21 | class buffered_write_stream; 22 | 23 | } // namespace asio 24 | 25 | #endif // ASIO_BUFFERED_WRITE_STREAM_FWD_HPP 26 | -------------------------------------------------------------------------------- /third_include/asio/detail/array.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/array.hpp 3 | // ~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_ARRAY_HPP 12 | #define ASIO_DETAIL_ARRAY_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #include 21 | 22 | namespace asio { 23 | namespace detail { 24 | 25 | using std::array; 26 | 27 | } // namespace detail 28 | } // namespace asio 29 | 30 | #endif // ASIO_DETAIL_ARRAY_HPP 31 | -------------------------------------------------------------------------------- /third_include/asio/ts/net.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ts/net.hpp 3 | // ~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_TS_NET_HPP 12 | #define ASIO_TS_NET_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/ts/netfwd.hpp" 19 | #include "asio/ts/executor.hpp" 20 | #include "asio/ts/io_context.hpp" 21 | #include "asio/ts/timer.hpp" 22 | #include "asio/ts/buffer.hpp" 23 | #include "asio/ts/socket.hpp" 24 | #include "asio/ts/internet.hpp" 25 | 26 | #endif // ASIO_TS_NET_HPP 27 | -------------------------------------------------------------------------------- /third_include/jemalloc/scripts/windows/before_script.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | if [[ "$TRAVIS_OS_NAME" != "windows" ]]; then 6 | echo "Incorrect \$TRAVIS_OS_NAME: expected windows, got $TRAVIS_OS_NAME" 7 | exit 1 8 | fi 9 | 10 | $build_env autoconf 11 | $build_env ./configure $CONFIGURE_FLAGS 12 | # mingw32-make simply means "make", unrelated to mingw32 vs mingw64. 13 | # Simply disregard the prefix and treat is as "make". 14 | $build_env mingw32-make -j3 15 | # At the moment, it's impossible to make tests in parallel, 16 | # seemingly due to concurrent writes to '.pdb' file. I don't know why 17 | # that happens, because we explicitly supply '/Fs' to the compiler. 18 | # Until we figure out how to fix it, we should build tests sequentially 19 | # on Windows. 20 | $build_env mingw32-make tests 21 | -------------------------------------------------------------------------------- /third_include/asio/ts/timer.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ts/timer.hpp 3 | // ~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_TS_TIMER_HPP 12 | #define ASIO_TS_TIMER_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/chrono.hpp" 19 | 20 | #include "asio/wait_traits.hpp" 21 | #include "asio/basic_waitable_timer.hpp" 22 | #include "asio/system_timer.hpp" 23 | #include "asio/steady_timer.hpp" 24 | #include "asio/high_resolution_timer.hpp" 25 | 26 | #endif // ASIO_TS_TIMER_HPP 27 | -------------------------------------------------------------------------------- /third_include/asio/signal_set.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // signal_set.hpp 3 | // ~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SIGNAL_SET_HPP 12 | #define ASIO_SIGNAL_SET_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/basic_signal_set.hpp" 20 | 21 | namespace asio { 22 | 23 | /// Typedef for the typical usage of a signal set. 24 | typedef basic_signal_set<> signal_set; 25 | 26 | } // namespace asio 27 | 28 | #endif // ASIO_SIGNAL_SET_HPP 29 | -------------------------------------------------------------------------------- /third_include/jemalloc/include/jemalloc/internal/spin.h: -------------------------------------------------------------------------------- 1 | #ifndef JEMALLOC_INTERNAL_SPIN_H 2 | #define JEMALLOC_INTERNAL_SPIN_H 3 | 4 | #define SPIN_INITIALIZER {0U} 5 | 6 | typedef struct { 7 | unsigned iteration; 8 | } spin_t; 9 | 10 | static inline void 11 | spin_cpu_spinwait() { 12 | # if HAVE_CPU_SPINWAIT 13 | CPU_SPINWAIT; 14 | # else 15 | volatile int x = 0; 16 | x = x; 17 | # endif 18 | } 19 | 20 | static inline void 21 | spin_adaptive(spin_t *spin) { 22 | volatile uint32_t i; 23 | 24 | if (spin->iteration < 5) { 25 | for (i = 0; i < (1U << spin->iteration); i++) { 26 | spin_cpu_spinwait(); 27 | } 28 | spin->iteration++; 29 | } else { 30 | #ifdef _WIN32 31 | SwitchToThread(); 32 | #else 33 | sched_yield(); 34 | #endif 35 | } 36 | } 37 | 38 | #undef SPIN_INLINE 39 | 40 | #endif /* JEMALLOC_INTERNAL_SPIN_H */ 41 | -------------------------------------------------------------------------------- /third_include/asio/detail/exception.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/exception.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_EXCEPTION_HPP 12 | #define ASIO_DETAIL_EXCEPTION_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include 20 | 21 | namespace asio { 22 | 23 | using std::exception_ptr; 24 | using std::current_exception; 25 | using std::rethrow_exception; 26 | 27 | } // namespace asio 28 | 29 | #endif // ASIO_DETAIL_EXCEPTION_HPP 30 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/div.c: -------------------------------------------------------------------------------- 1 | #include "test/jemalloc_test.h" 2 | 3 | #include "jemalloc/internal/div.h" 4 | 5 | TEST_BEGIN(test_div_exhaustive) { 6 | for (size_t divisor = 2; divisor < 1000 * 1000; ++divisor) { 7 | div_info_t div_info; 8 | div_init(&div_info, divisor); 9 | size_t max = 1000 * divisor; 10 | if (max < 1000 * 1000) { 11 | max = 1000 * 1000; 12 | } 13 | for (size_t dividend = 0; dividend < 1000 * divisor; 14 | dividend += divisor) { 15 | size_t quotient = div_compute( 16 | &div_info, dividend); 17 | expect_zu_eq(dividend, quotient * divisor, 18 | "With divisor = %zu, dividend = %zu, " 19 | "got quotient %zu", divisor, dividend, quotient); 20 | } 21 | } 22 | } 23 | TEST_END 24 | 25 | int 26 | main(void) { 27 | return test_no_reentrancy( 28 | test_div_exhaustive); 29 | } 30 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/malloc_conf_2.c: -------------------------------------------------------------------------------- 1 | #include "test/jemalloc_test.h" 2 | 3 | const char *malloc_conf = "dirty_decay_ms:1000"; 4 | const char *malloc_conf_2_conf_harder = "dirty_decay_ms:1234"; 5 | 6 | TEST_BEGIN(test_malloc_conf_2) { 7 | #ifdef _WIN32 8 | bool windows = true; 9 | #else 10 | bool windows = false; 11 | #endif 12 | /* Windows doesn't support weak symbol linker trickery. */ 13 | test_skip_if(windows); 14 | 15 | ssize_t dirty_decay_ms; 16 | size_t sz = sizeof(dirty_decay_ms); 17 | 18 | int err = mallctl("opt.dirty_decay_ms", &dirty_decay_ms, &sz, NULL, 0); 19 | assert_d_eq(err, 0, "Unexpected mallctl failure"); 20 | expect_zd_eq(dirty_decay_ms, 1234, 21 | "malloc_conf_2 setting didn't take effect"); 22 | } 23 | TEST_END 24 | 25 | int 26 | main(void) { 27 | return test( 28 | test_malloc_conf_2); 29 | } 30 | -------------------------------------------------------------------------------- /third_include/jemalloc/include/jemalloc/internal/prof_hook.h: -------------------------------------------------------------------------------- 1 | #ifndef JEMALLOC_INTERNAL_PROF_HOOK_H 2 | #define JEMALLOC_INTERNAL_PROF_HOOK_H 3 | 4 | /* 5 | * The hooks types of which are declared in this file are experimental and 6 | * undocumented, thus the typedefs are located in an 'internal' header. 7 | */ 8 | 9 | /* 10 | * A hook to mock out backtrace functionality. This can be handy, since it's 11 | * otherwise difficult to guarantee that two allocations are reported as coming 12 | * from the exact same stack trace in the presence of an optimizing compiler. 13 | */ 14 | typedef void (*prof_backtrace_hook_t)(void **, unsigned *, unsigned); 15 | 16 | /* 17 | * A callback hook that notifies about recently dumped heap profile. 18 | */ 19 | typedef void (*prof_dump_hook_t)(const char *filename); 20 | 21 | #endif /* JEMALLOC_INTERNAL_PROF_HOOK_H */ 22 | -------------------------------------------------------------------------------- /third_include/openssl/__DECC_INCLUDE_EPILOGUE.H: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2020 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | /* 11 | * This file is only used by HP C/C++ on VMS, and is included automatically 12 | * after each header file from this directory 13 | */ 14 | 15 | /* 16 | * The C++ compiler doesn't understand these pragmas, even though it 17 | * understands the corresponding command line qualifier. 18 | */ 19 | #ifndef __cplusplus 20 | /* restore state. Must correspond to the save in __decc_include_prologue.h */ 21 | # pragma names restore 22 | #endif 23 | -------------------------------------------------------------------------------- /third_include/spdlog/sinks/sink-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifndef SPDLOG_HEADER_ONLY 7 | # include 8 | #endif 9 | 10 | #include 11 | 12 | SPDLOG_INLINE bool spdlog::sinks::sink::should_log(spdlog::level::level_enum msg_level) const 13 | { 14 | return msg_level >= level_.load(std::memory_order_relaxed); 15 | } 16 | 17 | SPDLOG_INLINE void spdlog::sinks::sink::set_level(level::level_enum log_level) 18 | { 19 | level_.store(log_level, std::memory_order_relaxed); 20 | } 21 | 22 | SPDLOG_INLINE spdlog::level::level_enum spdlog::sinks::sink::level() const 23 | { 24 | return static_cast(level_.load(std::memory_order_relaxed)); 25 | } 26 | -------------------------------------------------------------------------------- /third_include/asio/system_error.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // system_error.hpp 3 | // ~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SYSTEM_ERROR_HPP 12 | #define ASIO_SYSTEM_ERROR_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | 25 | typedef std::system_error system_error; 26 | 27 | } // namespace asio 28 | 29 | #include "asio/detail/pop_options.hpp" 30 | 31 | #endif // ASIO_SYSTEM_ERROR_HPP 32 | -------------------------------------------------------------------------------- /third_include/spdlog/cfg/helpers.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | namespace spdlog { 10 | namespace cfg { 11 | namespace helpers { 12 | // 13 | // Init levels from given string 14 | // 15 | // Examples: 16 | // 17 | // set global level to debug: "debug" 18 | // turn off all logging except for logger1: "off,logger1=debug" 19 | // turn off all logging except for logger1 and logger2: "off,logger1=debug,logger2=info" 20 | // 21 | SPDLOG_API void load_levels(const std::string &txt); 22 | } // namespace helpers 23 | 24 | } // namespace cfg 25 | } // namespace spdlog 26 | 27 | #ifdef SPDLOG_HEADER_ONLY 28 | # include "helpers-inl.h" 29 | #endif // SPDLOG_HEADER_ONLY 30 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/pages.c: -------------------------------------------------------------------------------- 1 | #include "test/jemalloc_test.h" 2 | 3 | TEST_BEGIN(test_pages_huge) { 4 | size_t alloc_size; 5 | bool commit; 6 | void *pages, *hugepage; 7 | 8 | alloc_size = HUGEPAGE * 2 - PAGE; 9 | commit = true; 10 | pages = pages_map(NULL, alloc_size, PAGE, &commit); 11 | expect_ptr_not_null(pages, "Unexpected pages_map() error"); 12 | 13 | if (init_system_thp_mode == thp_mode_default) { 14 | hugepage = (void *)(ALIGNMENT_CEILING((uintptr_t)pages, HUGEPAGE)); 15 | expect_b_ne(pages_huge(hugepage, HUGEPAGE), have_madvise_huge, 16 | "Unexpected pages_huge() result"); 17 | expect_false(pages_nohuge(hugepage, HUGEPAGE), 18 | "Unexpected pages_nohuge() result"); 19 | } 20 | 21 | pages_unmap(pages, alloc_size); 22 | } 23 | TEST_END 24 | 25 | int 26 | main(void) { 27 | return test( 28 | test_pages_huge); 29 | } 30 | -------------------------------------------------------------------------------- /third_include/jemalloc/include/jemalloc/internal/extent_dss.h: -------------------------------------------------------------------------------- 1 | #ifndef JEMALLOC_INTERNAL_EXTENT_DSS_H 2 | #define JEMALLOC_INTERNAL_EXTENT_DSS_H 3 | 4 | typedef enum { 5 | dss_prec_disabled = 0, 6 | dss_prec_primary = 1, 7 | dss_prec_secondary = 2, 8 | 9 | dss_prec_limit = 3 10 | } dss_prec_t; 11 | #define DSS_PREC_DEFAULT dss_prec_secondary 12 | #define DSS_DEFAULT "secondary" 13 | 14 | extern const char *dss_prec_names[]; 15 | 16 | extern const char *opt_dss; 17 | 18 | dss_prec_t extent_dss_prec_get(void); 19 | bool extent_dss_prec_set(dss_prec_t dss_prec); 20 | void *extent_alloc_dss(tsdn_t *tsdn, arena_t *arena, void *new_addr, 21 | size_t size, size_t alignment, bool *zero, bool *commit); 22 | bool extent_in_dss(void *addr); 23 | bool extent_dss_mergeable(void *addr_a, void *addr_b); 24 | void extent_dss_boot(void); 25 | 26 | #endif /* JEMALLOC_INTERNAL_EXTENT_DSS_H */ 27 | -------------------------------------------------------------------------------- /PSS_ASIO/Message/SyncLogic.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include "ISession.h" 6 | #include "LoadModule.h" 7 | 8 | //同步在执行逻辑模块 9 | //add by freeeyes 10 | 11 | class CSyncLogic 12 | { 13 | public: 14 | CSyncLogic(void) = default; 15 | 16 | void Close(); 17 | 18 | void Init(const command_to_module_function& command_to_module_function); 19 | 20 | void do_sync_message_list(CMessage_Source& source, vector>& message_list, std::shared_ptr send_packet) const; 21 | 22 | bool do_sync_message(const uint16 command_id, const CMessage_Source& source, std::shared_ptr recv_packet, std::shared_ptr send_packet); 23 | 24 | private: 25 | command_to_module_function command_to_session_function_; //同步线程执行列表 26 | }; 27 | 28 | using App_SyncLogic = PSS_singleton; -------------------------------------------------------------------------------- /third_include/asio/detail/functional.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/functional.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_FUNCTIONAL_HPP 12 | #define ASIO_DETAIL_FUNCTIONAL_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include 20 | 21 | namespace asio { 22 | namespace detail { 23 | 24 | using std::function; 25 | 26 | } // namespace detail 27 | 28 | using std::ref; 29 | using std::reference_wrapper; 30 | 31 | } // namespace asio 32 | 33 | #endif // ASIO_DETAIL_FUNCTIONAL_HPP 34 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/stress/large_microbench.c: -------------------------------------------------------------------------------- 1 | #include "test/jemalloc_test.h" 2 | #include "test/bench.h" 3 | 4 | static void 5 | large_mallocx_free(void) { 6 | /* 7 | * We go a bit larger than the large minclass on its own to better 8 | * expose costs from things like zeroing. 9 | */ 10 | void *p = mallocx(SC_LARGE_MINCLASS, MALLOCX_TCACHE_NONE); 11 | assert_ptr_not_null(p, "mallocx shouldn't fail"); 12 | free(p); 13 | } 14 | 15 | static void 16 | small_mallocx_free(void) { 17 | void *p = mallocx(16, 0); 18 | assert_ptr_not_null(p, "mallocx shouldn't fail"); 19 | free(p); 20 | } 21 | 22 | TEST_BEGIN(test_large_vs_small) { 23 | compare_funcs(100*1000, 1*1000*1000, "large mallocx", 24 | large_mallocx_free, "small mallocx", small_mallocx_free); 25 | } 26 | TEST_END 27 | 28 | int 29 | main(void) { 30 | return test_no_reentrancy( 31 | test_large_vs_small); 32 | } 33 | 34 | -------------------------------------------------------------------------------- /third_include/spdlog/details/synchronous_factory.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include "registry.h" 7 | 8 | namespace spdlog { 9 | 10 | // Default logger factory- creates synchronous loggers 11 | class logger; 12 | 13 | struct synchronous_factory 14 | { 15 | template 16 | static std::shared_ptr create(std::string logger_name, SinkArgs &&... args) 17 | { 18 | auto sink = std::make_shared(std::forward(args)...); 19 | auto new_logger = std::make_shared(std::move(logger_name), std::move(sink)); 20 | details::registry::instance().initialize_logger(new_logger); 21 | return new_logger; 22 | } 23 | }; 24 | } // namespace spdlog 25 | -------------------------------------------------------------------------------- /third_include/asio/ssl.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl.hpp 3 | // ~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_HPP 12 | #define ASIO_SSL_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/ssl/context.hpp" 19 | #include "asio/ssl/context_base.hpp" 20 | #include "asio/ssl/error.hpp" 21 | #include "asio/ssl/rfc2818_verification.hpp" 22 | #include "asio/ssl/host_name_verification.hpp" 23 | #include "asio/ssl/stream.hpp" 24 | #include "asio/ssl/stream_base.hpp" 25 | #include "asio/ssl/verify_context.hpp" 26 | #include "asio/ssl/verify_mode.hpp" 27 | 28 | #endif // ASIO_SSL_HPP 29 | -------------------------------------------------------------------------------- /third_include/asio/static_thread_pool.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // static_thread_pool.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_STATIC_THREAD_POOL_HPP 12 | #define ASIO_STATIC_THREAD_POOL_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/thread_pool.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | 25 | typedef thread_pool static_thread_pool; 26 | 27 | } // namespace asio 28 | 29 | #include "asio/detail/pop_options.hpp" 30 | 31 | #endif // ASIO_STATIC_THREAD_POOL_HPP 32 | -------------------------------------------------------------------------------- /third_include/asio/streambuf.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // streambuf.hpp 3 | // ~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_STREAMBUF_HPP 12 | #define ASIO_STREAMBUF_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_NO_IOSTREAM) 21 | 22 | #include "asio/basic_streambuf.hpp" 23 | 24 | namespace asio { 25 | 26 | /// Typedef for the typical usage of basic_streambuf. 27 | typedef basic_streambuf<> streambuf; 28 | 29 | } // namespace asio 30 | 31 | #endif // !defined(ASIO_NO_IOSTREAM) 32 | 33 | #endif // ASIO_STREAMBUF_HPP 34 | -------------------------------------------------------------------------------- /third_include/asio/ts/socket.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ts/socket.hpp 3 | // ~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_TS_SOCKET_HPP 12 | #define ASIO_TS_SOCKET_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/socket_base.hpp" 19 | #include "asio/basic_socket.hpp" 20 | #include "asio/basic_datagram_socket.hpp" 21 | #include "asio/basic_stream_socket.hpp" 22 | #include "asio/basic_socket_acceptor.hpp" 23 | #include "asio/basic_socket_streambuf.hpp" 24 | #include "asio/basic_socket_iostream.hpp" 25 | #include "asio/connect.hpp" 26 | 27 | #endif // ASIO_TS_SOCKET_HPP 28 | -------------------------------------------------------------------------------- /PSS_ASIO/TcpSession/TcpServer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "TcpSession.h" 4 | #include "IoContextPool.h" 5 | #include "IoListManager.h" 6 | 7 | class CTcpServer : public std::enable_shared_from_this, public CIo_Net_server 8 | { 9 | public: 10 | CTcpServer(const CreateIoContextCallbackFunc& callback, const CConfigNetIO& config_io, CIo_List_Manager* io_list_manager); 11 | 12 | virtual ~CTcpServer() = default; 13 | 14 | void close() final; 15 | 16 | void start(); 17 | 18 | private: 19 | void do_accept(); 20 | 21 | void send_accept_listen_fail(std::error_code ec); 22 | 23 | std::shared_ptr acceptor_; 24 | uint32 packet_parse_id_ = 0; 25 | uint32 max_recv_size_ = 0; 26 | CreateIoContextCallbackFunc callback_; 27 | 28 | string server_ip_; 29 | io_port_type server_port_; 30 | CIo_List_Manager* io_list_manager_ = nullptr; 31 | }; 32 | 33 | -------------------------------------------------------------------------------- /third_include/jemalloc/scripts/check-formatting.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # The files that need to be properly formatted. We'll grow this incrementally 4 | # until it includes all the jemalloc source files (as we convert things over), 5 | # and then just replace it with 6 | # find -name '*.c' -o -name '*.h' -o -name '*.cpp 7 | FILES=( 8 | ) 9 | 10 | if command -v clang-format &> /dev/null; then 11 | CLANG_FORMAT="clang-format" 12 | elif command -v clang-format-8 &> /dev/null; then 13 | CLANG_FORMAT="clang-format-8" 14 | else 15 | echo "Couldn't find clang-format." 16 | fi 17 | 18 | if ! $CLANG_FORMAT -version | grep "version 8\." &> /dev/null; then 19 | echo "clang-format is the wrong version." 20 | exit 1 21 | fi 22 | 23 | for file in ${FILES[@]}; do 24 | if ! cmp --silent $file <($CLANG_FORMAT $file) &> /dev/null; then 25 | echo "Error: $file is not clang-formatted" 26 | exit 1 27 | fi 28 | done 29 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/src/thd.c: -------------------------------------------------------------------------------- 1 | #include "test/jemalloc_test.h" 2 | 3 | #ifdef _WIN32 4 | void 5 | thd_create(thd_t *thd, void *(*proc)(void *), void *arg) { 6 | LPTHREAD_START_ROUTINE routine = (LPTHREAD_START_ROUTINE)proc; 7 | *thd = CreateThread(NULL, 0, routine, arg, 0, NULL); 8 | if (*thd == NULL) { 9 | test_fail("Error in CreateThread()\n"); 10 | } 11 | } 12 | 13 | void 14 | thd_join(thd_t thd, void **ret) { 15 | if (WaitForSingleObject(thd, INFINITE) == WAIT_OBJECT_0 && ret) { 16 | DWORD exit_code; 17 | GetExitCodeThread(thd, (LPDWORD) &exit_code); 18 | *ret = (void *)(uintptr_t)exit_code; 19 | } 20 | } 21 | 22 | #else 23 | void 24 | thd_create(thd_t *thd, void *(*proc)(void *), void *arg) { 25 | if (pthread_create(thd, NULL, proc, arg) != 0) { 26 | test_fail("Error in pthread_create()\n"); 27 | } 28 | } 29 | 30 | void 31 | thd_join(thd_t thd, void **ret) { 32 | pthread_join(thd, ret); 33 | } 34 | #endif 35 | -------------------------------------------------------------------------------- /third_include/asio/io_service.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // io_service.hpp 3 | // ~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IO_SERVICE_HPP 12 | #define ASIO_IO_SERVICE_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/io_context.hpp" 19 | 20 | #include "asio/detail/push_options.hpp" 21 | 22 | namespace asio { 23 | 24 | #if !defined(ASIO_NO_DEPRECATED) 25 | /// Typedef for backwards compatibility. 26 | typedef io_context io_service; 27 | #endif // !defined(ASIO_NO_DEPRECATED) 28 | 29 | } // namespace asio 30 | 31 | #include "asio/detail/pop_options.hpp" 32 | 33 | #endif // ASIO_IO_SERVICE_HPP 34 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/zero_realloc_free.c: -------------------------------------------------------------------------------- 1 | #include "test/jemalloc_test.h" 2 | 3 | static uint64_t 4 | deallocated() { 5 | if (!config_stats) { 6 | return 0; 7 | } 8 | uint64_t deallocated; 9 | size_t sz = sizeof(deallocated); 10 | expect_d_eq(mallctl("thread.deallocated", (void *)&deallocated, &sz, 11 | NULL, 0), 0, "Unexpected mallctl failure"); 12 | return deallocated; 13 | } 14 | 15 | TEST_BEGIN(test_realloc_free) { 16 | void *ptr = mallocx(42, 0); 17 | expect_ptr_not_null(ptr, "Unexpected mallocx error"); 18 | uint64_t deallocated_before = deallocated(); 19 | ptr = realloc(ptr, 0); 20 | uint64_t deallocated_after = deallocated(); 21 | expect_ptr_null(ptr, "Realloc didn't free"); 22 | if (config_stats) { 23 | expect_u64_gt(deallocated_after, deallocated_before, 24 | "Realloc didn't free"); 25 | } 26 | } 27 | TEST_END 28 | 29 | int 30 | main(void) { 31 | return test( 32 | test_realloc_free); 33 | } 34 | -------------------------------------------------------------------------------- /third_include/openssl/__DECC_INCLUDE_PROLOGUE.H: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2020 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | /* 11 | * This file is only used by HP C/C++ on VMS, and is included automatically 12 | * after each header file from this directory 13 | */ 14 | 15 | /* 16 | * The C++ compiler doesn't understand these pragmas, even though it 17 | * understands the corresponding command line qualifier. 18 | */ 19 | #ifndef __cplusplus 20 | /* save state */ 21 | # pragma names save 22 | /* have the compiler shorten symbols larger than 31 chars to 23 chars 23 | * followed by a 8 hex char CRC 24 | */ 25 | # pragma names as_is,shortened 26 | #endif 27 | -------------------------------------------------------------------------------- /third_include/asio/detail/date_time_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/date_time_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_DATE_TIME_FWD_HPP 12 | #define ASIO_DETAIL_DATE_TIME_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | namespace boost { 21 | namespace date_time { 22 | 23 | template 24 | class base_time; 25 | 26 | } // namespace date_time 27 | namespace posix_time { 28 | 29 | class ptime; 30 | 31 | } // namespace posix_time 32 | } // namespace boost 33 | 34 | #endif // ASIO_DETAIL_DATE_TIME_FWD_HPP 35 | -------------------------------------------------------------------------------- /third_include/asio/ssl/impl/src.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // impl/ssl/src.hpp 3 | // ~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_IMPL_SRC_HPP 12 | #define ASIO_SSL_IMPL_SRC_HPP 13 | 14 | #define ASIO_SOURCE 15 | 16 | #include "asio/detail/config.hpp" 17 | 18 | #if defined(ASIO_HEADER_ONLY) 19 | # error Do not compile Asio library source with ASIO_HEADER_ONLY defined 20 | #endif 21 | 22 | #include "asio/ssl/impl/context.ipp" 23 | #include "asio/ssl/impl/error.ipp" 24 | #include "asio/ssl/detail/impl/engine.ipp" 25 | #include "asio/ssl/detail/impl/openssl_init.ipp" 26 | #include "asio/ssl/impl/host_name_verification.ipp" 27 | #include "asio/ssl/impl/rfc2818_verification.ipp" 28 | 29 | #endif // ASIO_SSL_IMPL_SRC_HPP 30 | -------------------------------------------------------------------------------- /PSS_ASIO/Common/ICommunicationService.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "define.h" 4 | #include "asio.hpp" 5 | #include "IoContextPool.h" 6 | 7 | //服务器间链接接口虚类 8 | //add by freeyes 9 | 10 | class ICommunicationInterface 11 | { 12 | public: 13 | virtual ~ICommunicationInterface() = default; 14 | 15 | virtual void init_communication_service(CreateIoContextCallbackFunc callback, uint16 timeout_seconds) = 0; 16 | 17 | virtual bool add_connect(const CConnect_IO_Info& io_info, EM_CONNECT_IO_TYPE io_type) = 0; 18 | 19 | virtual void set_connect_id(uint32 server_id, uint32 connect_id) = 0; 20 | 21 | virtual void reset_connect(uint32 server_id) = 0; 22 | 23 | virtual void close_connect(uint32 server_id) = 0; 24 | 25 | virtual bool is_exist(uint32 server_id) = 0; 26 | 27 | virtual void close() = 0; 28 | 29 | virtual uint32 get_server_id(uint32 connect_id) = 0; 30 | 31 | virtual uint32 get_connect_id(uint32 server_id) = 0; 32 | }; 33 | -------------------------------------------------------------------------------- /third_include/asio/impl/system_context.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // impl/system_context.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IMPL_SYSTEM_CONTEXT_HPP 12 | #define ASIO_IMPL_SYSTEM_CONTEXT_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/system_executor.hpp" 19 | 20 | #include "asio/detail/push_options.hpp" 21 | 22 | namespace asio { 23 | 24 | inline system_context::executor_type 25 | system_context::get_executor() noexcept 26 | { 27 | return system_executor(); 28 | } 29 | 30 | } // namespace asio 31 | 32 | #include "asio/detail/pop_options.hpp" 33 | 34 | #endif // ASIO_IMPL_SYSTEM_CONTEXT_HPP 35 | -------------------------------------------------------------------------------- /third_include/jemalloc/include/jemalloc/internal/activity_callback.h: -------------------------------------------------------------------------------- 1 | #ifndef JEMALLOC_INTERNAL_ACTIVITY_CALLBACK_H 2 | #define JEMALLOC_INTERNAL_ACTIVITY_CALLBACK_H 3 | 4 | /* 5 | * The callback to be executed "periodically", in response to some amount of 6 | * allocator activity. 7 | * 8 | * This callback need not be computing any sort of peak (although that's the 9 | * intended first use case), but we drive it from the peak counter, so it's 10 | * keeps things tidy to keep it here. 11 | * 12 | * The calls to this thunk get driven by the peak_event module. 13 | */ 14 | #define ACTIVITY_CALLBACK_THUNK_INITIALIZER {NULL, NULL} 15 | typedef void (*activity_callback_t)(void *uctx, uint64_t allocated, 16 | uint64_t deallocated); 17 | typedef struct activity_callback_thunk_s activity_callback_thunk_t; 18 | struct activity_callback_thunk_s { 19 | activity_callback_t callback; 20 | void *uctx; 21 | }; 22 | 23 | #endif /* JEMALLOC_INTERNAL_ACTIVITY_CALLBACK_H */ 24 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/unit/test_hooks.c: -------------------------------------------------------------------------------- 1 | #include "test/jemalloc_test.h" 2 | 3 | static bool hook_called = false; 4 | 5 | static void 6 | hook() { 7 | hook_called = true; 8 | } 9 | 10 | static int 11 | func_to_hook(int arg1, int arg2) { 12 | return arg1 + arg2; 13 | } 14 | 15 | #define func_to_hook JEMALLOC_TEST_HOOK(func_to_hook, test_hooks_libc_hook) 16 | 17 | TEST_BEGIN(unhooked_call) { 18 | test_hooks_libc_hook = NULL; 19 | hook_called = false; 20 | expect_d_eq(3, func_to_hook(1, 2), "Hooking changed return value."); 21 | expect_false(hook_called, "Nulling out hook didn't take."); 22 | } 23 | TEST_END 24 | 25 | TEST_BEGIN(hooked_call) { 26 | test_hooks_libc_hook = &hook; 27 | hook_called = false; 28 | expect_d_eq(3, func_to_hook(1, 2), "Hooking changed return value."); 29 | expect_true(hook_called, "Hook should have executed."); 30 | } 31 | TEST_END 32 | 33 | int 34 | main(void) { 35 | return test( 36 | unhooked_call, 37 | hooked_call); 38 | } 39 | -------------------------------------------------------------------------------- /third_include/jemalloc/src/counter.c: -------------------------------------------------------------------------------- 1 | #include "jemalloc/internal/jemalloc_preamble.h" 2 | #include "jemalloc/internal/jemalloc_internal_includes.h" 3 | 4 | #include "jemalloc/internal/counter.h" 5 | 6 | bool 7 | counter_accum_init(counter_accum_t *counter, uint64_t interval) { 8 | if (LOCKEDINT_MTX_INIT(counter->mtx, "counter_accum", 9 | WITNESS_RANK_COUNTER_ACCUM, malloc_mutex_rank_exclusive)) { 10 | return true; 11 | } 12 | locked_init_u64_unsynchronized(&counter->accumbytes, 0); 13 | counter->interval = interval; 14 | return false; 15 | } 16 | 17 | void 18 | counter_prefork(tsdn_t *tsdn, counter_accum_t *counter) { 19 | LOCKEDINT_MTX_PREFORK(tsdn, counter->mtx); 20 | } 21 | 22 | void 23 | counter_postfork_parent(tsdn_t *tsdn, counter_accum_t *counter) { 24 | LOCKEDINT_MTX_POSTFORK_PARENT(tsdn, counter->mtx); 25 | } 26 | 27 | void 28 | counter_postfork_child(tsdn_t *tsdn, counter_accum_t *counter) { 29 | LOCKEDINT_MTX_POSTFORK_CHILD(tsdn, counter->mtx); 30 | } 31 | -------------------------------------------------------------------------------- /PSS_ASIO/Common/CoreTimer.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "define.h" 4 | #include "TimerManager.hpp" 5 | #include "singleton.h" 6 | 7 | class PSS_Timer_Manager 8 | { 9 | public: 10 | void Start() 11 | { 12 | m_timerMgr = std::make_shared(); 13 | 14 | m_ttTimerThread = std::thread([this]() 15 | { 16 | m_timerMgr->schedule(); 17 | PSS_LOGGER_DEBUG("[PSS_Timer_Manager::start]End."); 18 | }); 19 | } 20 | 21 | void Close() 22 | { 23 | if (nullptr != m_timerMgr) 24 | { 25 | m_timerMgr->Close(); 26 | m_ttTimerThread.join(); 27 | } 28 | } 29 | 30 | brynet::TimerMgr::Ptr GetTimerPtr() const 31 | { 32 | return m_timerMgr; 33 | } 34 | 35 | private: 36 | brynet::TimerMgr::Ptr m_timerMgr; 37 | std::thread m_ttTimerThread; 38 | }; 39 | 40 | using App_TimerManager = PSS_singleton; 41 | -------------------------------------------------------------------------------- /third_include/asio/detail/regex_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/regex_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_REGEX_FWD_HPP 12 | #define ASIO_DETAIL_REGEX_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #if defined(ASIO_HAS_BOOST_REGEX) 19 | 20 | namespace boost { 21 | 22 | template 23 | struct sub_match; 24 | 25 | template 26 | class match_results; 27 | 28 | template 29 | class basic_regex; 30 | 31 | } // namespace boost 32 | 33 | #endif // defined(ASIO_HAS_BOOST_REGEX) 34 | 35 | #endif // ASIO_DETAIL_REGEX_FWD_HPP 36 | -------------------------------------------------------------------------------- /third_include/jemalloc/test/include/test/btalloc.h: -------------------------------------------------------------------------------- 1 | /* btalloc() provides a mechanism for allocating via permuted backtraces. */ 2 | void *btalloc(size_t size, unsigned bits); 3 | 4 | #define btalloc_n_proto(n) \ 5 | void *btalloc_##n(size_t size, unsigned bits); 6 | btalloc_n_proto(0) 7 | btalloc_n_proto(1) 8 | 9 | #define btalloc_n_gen(n) \ 10 | void * \ 11 | btalloc_##n(size_t size, unsigned bits) { \ 12 | void *p; \ 13 | \ 14 | if (bits == 0) { \ 15 | p = mallocx(size, 0); \ 16 | } else { \ 17 | switch (bits & 0x1U) { \ 18 | case 0: \ 19 | p = (btalloc_0(size, bits >> 1)); \ 20 | break; \ 21 | case 1: \ 22 | p = (btalloc_1(size, bits >> 1)); \ 23 | break; \ 24 | default: not_reached(); \ 25 | } \ 26 | } \ 27 | /* Intentionally sabotage tail call optimization. */ \ 28 | expect_ptr_not_null(p, "Unexpected mallocx() failure"); \ 29 | return p; \ 30 | } 31 | -------------------------------------------------------------------------------- /third_include/asio/associator.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // associator.hpp 3 | // ~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_ASSOCIATOR_HPP 12 | #define ASIO_ASSOCIATOR_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #include "asio/detail/push_options.hpp" 21 | 22 | namespace asio { 23 | 24 | /// Used to generically specialise associators for a type. 25 | template