├── thirdlib ├── rocksdb-master │ ├── docs │ │ ├── CNAME │ │ ├── _includes │ │ │ ├── hero.html │ │ │ ├── doc_paging.html │ │ │ ├── nav │ │ │ │ ├── collection_nav_group_item.html │ │ │ │ └── collection_nav_group.html │ │ │ ├── plugins │ │ │ │ ├── button.html │ │ │ │ ├── all_share.html │ │ │ │ ├── plugin_row.html │ │ │ │ ├── google_share.html │ │ │ │ ├── iframe.html │ │ │ │ ├── ascii_cinema.html │ │ │ │ ├── github_star.html │ │ │ │ ├── github_watch.html │ │ │ │ ├── twitter_share.html │ │ │ │ ├── twitter_follow.html │ │ │ │ └── like_button.html │ │ │ ├── ui │ │ │ │ └── button.html │ │ │ ├── content │ │ │ │ └── gridblocks.html │ │ │ ├── katex_import.html │ │ │ └── nav_search.html │ │ ├── _data │ │ │ ├── powered_by.yml │ │ │ ├── powered_by_highlight.yml │ │ │ ├── nav_docs.yml │ │ │ ├── promo.yml │ │ │ └── authors.yml │ │ ├── _layouts │ │ │ ├── page.html │ │ │ ├── docs.html │ │ │ ├── post.html │ │ │ ├── redirect.html │ │ │ ├── plain.html │ │ │ ├── top-level.html │ │ │ ├── doc_page.html │ │ │ ├── blog.html │ │ │ ├── default.html │ │ │ ├── basic.html │ │ │ ├── blog_default.html │ │ │ ├── home.html │ │ │ └── doc_default.html │ │ ├── Gemfile │ │ ├── .gitignore │ │ ├── docs │ │ │ └── index.html │ │ ├── static │ │ │ ├── favicon.png │ │ │ ├── og_image.png │ │ │ ├── images │ │ │ │ ├── tree_example1.png │ │ │ │ ├── pcache-blockindex.jpg │ │ │ │ ├── pcache-fileindex.jpg │ │ │ │ ├── pcache-filelayout.jpg │ │ │ │ ├── pcache-readiopath.jpg │ │ │ │ ├── pcache-writeiopath.jpg │ │ │ │ ├── pcache-tieredstorage.jpg │ │ │ │ └── Resize-of-20140327_200754-300x225.jpg │ │ │ └── fonts │ │ │ │ ├── LatoLatin-Black.woff │ │ │ │ ├── LatoLatin-Black.woff2 │ │ │ │ ├── LatoLatin-Italic.woff │ │ │ │ ├── LatoLatin-Italic.woff2 │ │ │ │ ├── LatoLatin-Light.woff │ │ │ │ ├── LatoLatin-Light.woff2 │ │ │ │ ├── LatoLatin-Regular.woff │ │ │ │ ├── LatoLatin-Regular.woff2 │ │ │ │ ├── LatoLatin-BlackItalic.woff │ │ │ │ └── LatoLatin-BlackItalic.woff2 │ │ ├── index.md │ │ ├── blog │ │ │ ├── index.html │ │ │ └── all.html │ │ ├── doc-type-examples │ │ │ ├── top-level-example.md │ │ │ ├── docs-hello-world.md │ │ │ └── 2016-04-07-blog-post-example.md │ │ ├── _posts │ │ │ ├── 2015-06-12-rocksdb-in-osquery.markdown │ │ │ ├── 2014-05-22-rocksdb-3-1-release.markdown │ │ │ ├── 2014-05-19-rocksdb-3-0-release.markdown │ │ │ └── 2016-02-25-rocksdb-ama.markdown │ │ └── _top-level │ │ │ └── support.md │ ├── tools │ │ ├── rdb │ │ │ ├── .gitignore │ │ │ ├── rdb │ │ │ ├── rdb.cc │ │ │ └── binding.gyp │ │ ├── Dockerfile │ │ ├── sample-dump.dmp │ │ ├── rocksdb_dump_test.sh │ │ ├── CMakeLists.txt │ │ ├── ldb.cc │ │ ├── sst_dump.cc │ │ └── verify_random_db.sh │ ├── third-party │ │ ├── gtest-1.7.0 │ │ │ └── fused-src │ │ │ │ └── gtest │ │ │ │ └── CMakeLists.txt │ │ └── fbson │ │ │ └── COMMIT.md │ ├── build_tools │ │ ├── dockerbuild.sh │ │ └── version.sh │ ├── WINDOWS_PORT.md │ ├── arcanist_util │ │ ├── __phutil_library_init__.php │ │ └── unit_engine │ │ │ ├── FacebookFbcodeUnitTestEngine.php │ │ │ └── FacebookOldFbcodeUnitTestEngine.php │ ├── examples │ │ ├── README.md │ │ └── .gitignore │ ├── .clang-format │ ├── util │ │ ├── build_version.cc.in │ │ ├── perf_level_imp.h │ │ ├── build_version.h │ │ ├── clock_cache.h │ │ ├── filter_policy.cc │ │ ├── string_util.cc │ │ ├── env_chroot.h │ │ └── status_message.cc │ ├── AUTHORS │ ├── java │ │ ├── jdb_bench.sh │ │ ├── crossbuild │ │ │ ├── build-linux.sh │ │ │ └── Vagrantfile │ │ └── src │ │ │ ├── test │ │ │ └── java │ │ │ │ └── org │ │ │ │ └── rocksdb │ │ │ │ ├── RocksMemoryResource.java │ │ │ │ ├── CompressionOptionsTest.java │ │ │ │ └── StatsCallbackMock.java │ │ │ └── main │ │ │ └── java │ │ │ └── org │ │ │ └── rocksdb │ │ │ ├── MergeOperator.java │ │ │ ├── util │ │ │ └── SizeUnit.java │ │ │ ├── StringAppendOperator.java │ │ │ ├── BuiltinComparator.java │ │ │ └── RemoveEmptyValueCompactionFilter.java │ ├── hdfs │ │ └── setup.sh │ ├── port │ │ ├── README │ │ ├── stack_trace.h │ │ └── xpress.h │ ├── include │ │ └── rocksdb │ │ │ ├── db_bench_tool.h │ │ │ ├── utilities │ │ │ ├── convenience.h │ │ │ └── info_log_finder.h │ │ │ ├── sst_dump_tool.h │ │ │ ├── types.h │ │ │ └── version.h │ ├── utilities │ │ └── redis │ │ │ ├── redis_list_exception.h │ │ │ └── README │ ├── appveyor.yml │ ├── db │ │ └── db_info_dumper.h │ ├── .arcconfig │ ├── LANGUAGE-BINDINGS.md │ ├── CONTRIBUTING.md │ ├── DUMP_FORMAT.md │ └── table │ │ └── bloom_block.cc ├── iniparser-master │ ├── test │ │ ├── ressources │ │ │ ├── good_ini │ │ │ │ ├── empty.ini │ │ │ │ ├── spaced.ini │ │ │ │ └── spaced2.ini │ │ │ └── bad_ini │ │ │ │ └── twisted-errors.ini │ │ └── Makefile │ ├── html │ │ ├── tab_b.gif │ │ ├── tab_l.gif │ │ ├── tab_r.gif │ │ └── doxygen.png │ ├── example │ │ ├── twisted-errors.ini │ │ ├── twisted-genhuge.py │ │ ├── parse.c │ │ └── Makefile │ ├── .travis.yml │ ├── .gitignore │ ├── AUTHORS │ ├── doc │ │ └── Makefile │ └── INSTALL ├── lz4-master │ ├── programs │ │ └── .gitignore │ ├── examples │ │ ├── .gitignore │ │ ├── README.md │ │ └── printVersion.c │ ├── .gitattributes │ └── lib │ │ └── liblz4.pc.in ├── ut │ ├── README.md │ ├── lib │ │ ├── ut_def.h │ │ ├── ut_dll.h │ │ ├── ut_net.c │ │ ├── ut_fiber.h │ │ ├── ut_file.h │ │ ├── ut_math.h │ │ ├── ut_sock.c │ │ ├── ut_sock.h │ │ ├── ut_time.h │ │ ├── ut_packdata.c │ │ ├── ut_thread.h │ │ ├── ut_net_define.h │ │ ├── ut_net_handle.c │ │ ├── ut_net_handle.h │ │ ├── ut_net_iocp_work.c │ │ ├── ut_net_package.c │ │ ├── CMakeLists.txt │ │ ├── ut_error.h │ │ ├── ut_memory.c │ │ ├── ut_memory.h │ │ ├── ut_net_listener.h │ │ ├── ut_sprintf.h │ │ ├── ut_file.c │ │ ├── ut_packdata.h │ │ ├── ut_time.c │ │ ├── ut_error.c │ │ ├── ut_net_util.h │ │ ├── ut_errcode.c │ │ ├── ut_errcode.h │ │ └── ut_sprintf.c │ ├── test.c │ └── CMakeLists.txt ├── cppformat-master │ ├── doc │ │ ├── basic-bootstrap │ │ │ ├── theme.conf │ │ │ └── README │ │ ├── contents.rst │ │ ├── _static │ │ │ ├── fonts │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ └── glyphicons-halflings-regular.woff │ │ │ └── breathe.css │ │ ├── bootstrap │ │ │ ├── mixins │ │ │ │ ├── center-block.less │ │ │ │ ├── text-emphasis.less │ │ │ │ ├── size.less │ │ │ │ ├── background-variant.less │ │ │ │ ├── opacity.less │ │ │ │ ├── text-overflow.less │ │ │ │ ├── tab-focus.less │ │ │ │ ├── resize.less │ │ │ │ ├── labels.less │ │ │ │ ├── progress-bar.less │ │ │ │ ├── nav-divider.less │ │ │ │ ├── reset-filter.less │ │ │ │ ├── alerts.less │ │ │ │ ├── nav-vertical-align.less │ │ │ │ ├── responsive-visibility.less │ │ │ │ ├── pagination.less │ │ │ │ ├── border-radius.less │ │ │ │ ├── panels.less │ │ │ │ ├── list-group.less │ │ │ │ ├── hide-text.less │ │ │ │ ├── clearfix.less │ │ │ │ └── table-row.less │ │ │ ├── wells.less │ │ │ ├── breadcrumbs.less │ │ │ ├── responsive-embed.less │ │ │ └── component-animations.less │ │ └── CMakeLists.txt │ ├── support │ │ ├── biicode │ │ │ ├── ignore.bii │ │ │ ├── biicode.conf │ │ │ └── sample.cc │ │ ├── rtd │ │ │ ├── theme │ │ │ │ ├── theme.conf │ │ │ │ └── layout.html │ │ │ ├── index.rst │ │ │ └── conf.py │ │ ├── README │ │ ├── cmake │ │ │ ├── FindSetEnv.cmake │ │ │ ├── run-cmake.bat │ │ │ └── biicode.cmake │ │ └── biicode-build.py │ ├── .gitignore │ ├── Android.mk │ ├── appveyor.yml │ └── .travis.yml ├── spdlog-master │ ├── tests │ │ ├── main.cpp │ │ ├── includes.h │ │ ├── Makefile │ │ └── install_libcxx.sh │ ├── bench │ │ ├── logs │ │ │ └── .gitignore │ │ ├── glog-bench.cpp │ │ ├── easyl.conf │ │ ├── easylogging-bench.cpp │ │ └── spdlog-bench.cpp │ ├── astyle.sh │ ├── INSTALL │ ├── .gitignore │ └── example │ │ └── Makefile ├── lua-5.3.3 │ ├── doc │ │ ├── logo.gif │ │ ├── osi-certified-72x60.png │ │ ├── index.css │ │ └── manual.css │ ├── README │ └── src │ │ ├── lua.hpp │ │ └── lapi.h ├── protobuf-master │ ├── CONTRIBUTORS.txt │ ├── src │ │ └── CMake │ │ │ ├── pthread_test.cc.in │ │ │ ├── hash_set_test.cc.in │ │ │ └── hash_map_test.cc.in │ ├── protobuf-lite.pc.in │ └── protobuf.pc.in └── CMakeLists.txt ├── cardgame ├── tools │ ├── exportcfg │ │ ├── __init__.py │ │ ├── exportdata.py │ │ └── exportsep.py │ ├── exportgamedata │ │ └── __init__.py │ ├── generateproto │ │ └── __init__.py │ └── protobuf │ │ ├── protoc.exe │ │ ├── protogen.exe │ │ ├── protobuf-net.dll │ │ └── protogen.exe.config ├── doc │ └── fe引擎.docx ├── tables │ ├── 关卡.xlsx │ └── 角色.xlsx ├── CMakeLists.txt ├── server │ ├── frame │ │ └── src │ │ │ ├── CfgIni.h │ │ │ ├── main.cpp │ │ │ ├── PlayerMgr.cpp │ │ │ ├── ModuleHotSwap.h │ │ │ ├── ModuleLogin.cpp │ │ │ ├── ModuleHotSwap.cpp │ │ │ ├── ModuleNetMsgTrigger.cpp │ │ │ ├── interface │ │ │ ├── HotSwapPlugin.h │ │ │ └── ConstString.h │ │ │ ├── ReloadCfg.h │ │ │ ├── HotSwapPluginProxy.cpp │ │ │ ├── ModuleLogin.h │ │ │ ├── HotSwapPluginProxy.h │ │ │ ├── PlayerImpl.cpp │ │ │ ├── HotSwapServiceImpl.h │ │ │ └── PlayerImpl.h │ ├── proto │ │ ├── MarkDirty.h │ │ ├── MarkDirtyMap.h │ │ ├── CMakeLists.txt │ │ ├── cfg_loader.h │ │ └── IMarkDirty.h │ ├── hotswaplogic │ │ ├── src │ │ │ ├── ModuleFriend.cpp │ │ │ ├── ModuleShop.cpp │ │ │ ├── ModulePackHero.cpp │ │ │ ├── ModuleMsgTrigger.cpp │ │ │ ├── ModuleTalk.h │ │ │ ├── ModuleFriend.h │ │ │ ├── ModulePackHero.h │ │ │ ├── ModuleShop.h │ │ │ └── CardGameLogicPlugin.h │ │ └── CMakeLists.txt │ └── CMakeLists.txt ├── client │ └── cardgame.unitypackage └── proto │ └── scmsg.proto ├── bin ├── protoc ├── cardgame │ ├── servcfg.ini │ └── servcfg_linux.ini └── script │ └── test.lua ├── tools ├── protoc.exe ├── protogen.exe ├── protobuf-net.dll ├── protogen.exe.config └── buildproto.bat ├── doc └── freeengine.pptx ├── base ├── src │ ├── Reloadable.cpp │ ├── SpinlockGuard.cpp │ ├── base.cpp │ ├── Timer.h │ ├── LogConsole.h │ ├── NonCopyable.h │ ├── Timer.cpp │ ├── Scheduler.h │ ├── ReloadMgr.cpp │ ├── Spinlock.h │ ├── Config.cpp │ ├── Config.h │ ├── IModule.h │ ├── Reloadable.h │ ├── ILog.h │ ├── IComponentMgr.h │ ├── ReloadMgr.h │ ├── SpinlockGuard.h │ ├── Framework.h │ ├── ValueOpt.h │ ├── Singleton.h │ └── Spinlock.cpp └── CMakeLists.txt ├── module ├── modulelua │ ├── src │ │ ├── var.h │ │ ├── LuaFunc.h │ │ ├── luavar.cpp │ │ ├── luaoptutil.h │ │ ├── FunctionTraits.h │ │ ├── LuaExportFuncs.h │ │ ├── ModuleLuaExport.cpp │ │ ├── ModuleLuaMachine.cpp │ │ ├── ModuleLuaVar.cpp │ │ ├── luavar.h │ │ ├── ModuleLuaVar.h │ │ ├── ModuleLuaExport.h │ │ ├── ModuleLuaMachine.h │ │ └── LuaMachine.h │ └── CMakeLists.txt ├── modules │ ├── src │ │ ├── ProtobufMsgMgr.h │ │ ├── NetPeer.cpp │ │ ├── NetPeer.h │ │ ├── NetAddress.h │ │ ├── ModuleRocksDb.h │ │ └── NetAddress.cpp │ └── CMakeLists.txt ├── modulenetservice │ ├── src │ │ ├── ProtobufMsgMgr.h │ │ ├── NetPeer.cpp │ │ ├── NetPeer.h │ │ ├── NetAddress.h │ │ ├── NetAddress.cpp │ │ └── ModuleNetService.h │ └── CMakeLists.txt ├── CMakeLists.txt └── moduleactor │ ├── CMakeLists.txt │ └── src │ ├── ActorWork.cpp │ ├── ActorWork.h │ └── ActorNormalWorker.cpp ├── demos ├── demo4_lua │ ├── src │ │ ├── main.cpp │ │ ├── ModuleTest.cpp │ │ └── ModuleTest.h │ └── CMakeLists.txt ├── demo1_module │ ├── src │ │ ├── main.cpp │ │ ├── ModuleTest.h │ │ └── ModuleTest.cpp │ └── CMakeLists.txt ├── demo6_actor │ ├── src │ │ ├── main.cpp │ │ ├── ModuleTest.cpp │ │ └── ModuleTest.h │ └── CMakeLists.txt ├── demo3_modules │ ├── src │ │ ├── main.cpp │ │ ├── ModuleTest1.cpp │ │ ├── ModuleTest2.cpp │ │ ├── ModuleTest3.h │ │ ├── ModuleTest3.cpp │ │ ├── ModuleTest2.h │ │ └── ModuleTest1.h │ └── CMakeLists.txt ├── demo5_netclient │ ├── src │ │ ├── main.cpp │ │ └── ModuleClient.cpp │ └── CMakeLists.txt ├── demo5_netserver │ ├── src │ │ ├── main.cpp │ │ └── ModuleServer.cpp │ └── CMakeLists.txt ├── demo7_chatclient │ ├── src │ │ ├── main.cpp │ │ └── ModuleClient.cpp │ └── CMakeLists.txt ├── demo7_chatserver │ ├── src │ │ └── main.cpp │ └── CMakeLists.txt ├── demo2_modulecomponent │ ├── src │ │ ├── main.cpp │ │ ├── ModuleTestComponent.h │ │ └── ModuleTestComponent.cpp │ └── CMakeLists.txt └── CMakeLists.txt ├── .gitignore ├── README.md └── launcher ├── CMakeLists.txt └── src └── CommandLineOption.h /thirdlib/rocksdb-master/docs/CNAME: -------------------------------------------------------------------------------- 1 | rocksdb.org -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/_includes/hero.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /cardgame/tools/exportcfg/__init__.py: -------------------------------------------------------------------------------- 1 | __author__ = 'xt' 2 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/_includes/doc_paging.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/tools/rdb/.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | -------------------------------------------------------------------------------- /cardgame/tools/exportgamedata/__init__.py: -------------------------------------------------------------------------------- 1 | __author__ = 'xt' 2 | -------------------------------------------------------------------------------- /cardgame/tools/generateproto/__init__.py: -------------------------------------------------------------------------------- 1 | __author__ = 'xt' 2 | -------------------------------------------------------------------------------- /thirdlib/iniparser-master/test/ressources/good_ini/empty.ini: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /thirdlib/lz4-master/programs/.gitignore: -------------------------------------------------------------------------------- 1 | /lz4 2 | /*.exe 3 | -------------------------------------------------------------------------------- /bin/protoc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/bin/protoc -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/_data/powered_by.yml: -------------------------------------------------------------------------------- 1 | # Fill in later if desired 2 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/_layouts/page.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: blog 3 | --- 4 | -------------------------------------------------------------------------------- /thirdlib/ut/README.md: -------------------------------------------------------------------------------- 1 | # utnet 2 | 3 | a simple net lib for windows and linux 4 | -------------------------------------------------------------------------------- /thirdlib/cppformat-master/doc/basic-bootstrap/theme.conf: -------------------------------------------------------------------------------- 1 | [theme] 2 | inherit = basic 3 | -------------------------------------------------------------------------------- /thirdlib/cppformat-master/support/biicode/ignore.bii: -------------------------------------------------------------------------------- 1 | doc/* 2 | breathe/* 3 | gmock/* 4 | -------------------------------------------------------------------------------- /thirdlib/cppformat-master/support/rtd/theme/theme.conf: -------------------------------------------------------------------------------- 1 | [theme] 2 | inherit = basic 3 | -------------------------------------------------------------------------------- /thirdlib/spdlog-master/tests/main.cpp: -------------------------------------------------------------------------------- 1 | #define CATCH_CONFIG_MAIN 2 | #include "catch.hpp" -------------------------------------------------------------------------------- /tools/protoc.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/tools/protoc.exe -------------------------------------------------------------------------------- /doc/freeengine.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/doc/freeengine.pptx -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/_data/powered_by_highlight.yml: -------------------------------------------------------------------------------- 1 | # Fill in later if desired 2 | -------------------------------------------------------------------------------- /tools/protogen.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/tools/protogen.exe -------------------------------------------------------------------------------- /base/src/Reloadable.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/base/src/Reloadable.cpp -------------------------------------------------------------------------------- /cardgame/doc/fe引擎.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/cardgame/doc/fe引擎.docx -------------------------------------------------------------------------------- /cardgame/tables/关卡.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/cardgame/tables/关卡.xlsx -------------------------------------------------------------------------------- /cardgame/tables/角色.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/cardgame/tables/角色.xlsx -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | gem 'github-pages', '~> 104' 3 | -------------------------------------------------------------------------------- /thirdlib/ut/lib/ut_def.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/thirdlib/ut/lib/ut_def.h -------------------------------------------------------------------------------- /thirdlib/ut/lib/ut_dll.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/thirdlib/ut/lib/ut_dll.h -------------------------------------------------------------------------------- /thirdlib/ut/lib/ut_net.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/thirdlib/ut/lib/ut_net.c -------------------------------------------------------------------------------- /tools/protobuf-net.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/tools/protobuf-net.dll -------------------------------------------------------------------------------- /module/modulelua/src/var.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/module/modulelua/src/var.h -------------------------------------------------------------------------------- /thirdlib/ut/lib/ut_fiber.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/thirdlib/ut/lib/ut_fiber.h -------------------------------------------------------------------------------- /thirdlib/ut/lib/ut_file.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/thirdlib/ut/lib/ut_file.h -------------------------------------------------------------------------------- /thirdlib/ut/lib/ut_math.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/thirdlib/ut/lib/ut_math.h -------------------------------------------------------------------------------- /thirdlib/ut/lib/ut_sock.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/thirdlib/ut/lib/ut_sock.c -------------------------------------------------------------------------------- /thirdlib/ut/lib/ut_sock.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/thirdlib/ut/lib/ut_sock.h -------------------------------------------------------------------------------- /thirdlib/ut/lib/ut_time.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/thirdlib/ut/lib/ut_time.h -------------------------------------------------------------------------------- /cardgame/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | cmake_minimum_required(VERSION 2.8) 3 | 4 | add_subdirectory("server") 5 | 6 | -------------------------------------------------------------------------------- /demos/demo4_lua/src/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/demos/demo4_lua/src/main.cpp -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/_data/nav_docs.yml: -------------------------------------------------------------------------------- 1 | - title: Quick Start 2 | items: 3 | - id: getting-started 4 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/_layouts/docs.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: doc_page 3 | --- 4 | 5 | {% include doc.html %} -------------------------------------------------------------------------------- /thirdlib/ut/lib/ut_packdata.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/thirdlib/ut/lib/ut_packdata.c -------------------------------------------------------------------------------- /thirdlib/ut/lib/ut_thread.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/thirdlib/ut/lib/ut_thread.h -------------------------------------------------------------------------------- /demos/demo1_module/src/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/demos/demo1_module/src/main.cpp -------------------------------------------------------------------------------- /demos/demo6_actor/src/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/demos/demo6_actor/src/main.cpp -------------------------------------------------------------------------------- /module/modulelua/src/LuaFunc.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/module/modulelua/src/LuaFunc.h -------------------------------------------------------------------------------- /module/modulelua/src/luavar.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/module/modulelua/src/luavar.cpp -------------------------------------------------------------------------------- /thirdlib/lua-5.3.3/doc/logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/thirdlib/lua-5.3.3/doc/logo.gif -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/third-party/gtest-1.7.0/fused-src/gtest/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(gtest gtest-all.cc) 2 | -------------------------------------------------------------------------------- /thirdlib/ut/lib/ut_net_define.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/thirdlib/ut/lib/ut_net_define.h -------------------------------------------------------------------------------- /thirdlib/ut/lib/ut_net_handle.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/thirdlib/ut/lib/ut_net_handle.c -------------------------------------------------------------------------------- /thirdlib/ut/lib/ut_net_handle.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/thirdlib/ut/lib/ut_net_handle.h -------------------------------------------------------------------------------- /cardgame/server/frame/src/CfgIni.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/cardgame/server/frame/src/CfgIni.h -------------------------------------------------------------------------------- /cardgame/server/frame/src/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/cardgame/server/frame/src/main.cpp -------------------------------------------------------------------------------- /cardgame/server/proto/MarkDirty.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/cardgame/server/proto/MarkDirty.h -------------------------------------------------------------------------------- /cardgame/tools/protobuf/protoc.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/cardgame/tools/protobuf/protoc.exe -------------------------------------------------------------------------------- /demos/demo3_modules/src/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/demos/demo3_modules/src/main.cpp -------------------------------------------------------------------------------- /demos/demo4_lua/src/ModuleTest.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/demos/demo4_lua/src/ModuleTest.cpp -------------------------------------------------------------------------------- /demos/demo5_netclient/src/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/demos/demo5_netclient/src/main.cpp -------------------------------------------------------------------------------- /demos/demo5_netserver/src/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/demos/demo5_netserver/src/main.cpp -------------------------------------------------------------------------------- /module/modulelua/src/luaoptutil.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/module/modulelua/src/luaoptutil.h -------------------------------------------------------------------------------- /thirdlib/ut/lib/ut_net_iocp_work.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/thirdlib/ut/lib/ut_net_iocp_work.c -------------------------------------------------------------------------------- /thirdlib/ut/lib/ut_net_package.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/thirdlib/ut/lib/ut_net_package.c -------------------------------------------------------------------------------- /cardgame/server/proto/MarkDirtyMap.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/cardgame/server/proto/MarkDirtyMap.h -------------------------------------------------------------------------------- /cardgame/tools/protobuf/protogen.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/cardgame/tools/protobuf/protogen.exe -------------------------------------------------------------------------------- /demos/demo6_actor/src/ModuleTest.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/demos/demo6_actor/src/ModuleTest.cpp -------------------------------------------------------------------------------- /demos/demo7_chatclient/src/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/demos/demo7_chatclient/src/main.cpp -------------------------------------------------------------------------------- /demos/demo7_chatserver/src/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/demos/demo7_chatserver/src/main.cpp -------------------------------------------------------------------------------- /module/modules/src/ProtobufMsgMgr.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/module/modules/src/ProtobufMsgMgr.h -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/build_tools/dockerbuild.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | docker run -v $PWD:/rocks -w /rocks buildpack-deps make 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | cardgame/client/cardgame/ 2 | bin/Debug/ 3 | bin/cardgame/game.db/ 4 | bin/cardgame/Debug/ 5 | bin/cardgame/hstmp/ 6 | -------------------------------------------------------------------------------- /cardgame/client/cardgame.unitypackage: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/cardgame/client/cardgame.unitypackage -------------------------------------------------------------------------------- /cardgame/server/frame/src/PlayerMgr.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/cardgame/server/frame/src/PlayerMgr.cpp -------------------------------------------------------------------------------- /demos/demo3_modules/src/ModuleTest1.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/demos/demo3_modules/src/ModuleTest1.cpp -------------------------------------------------------------------------------- /demos/demo3_modules/src/ModuleTest2.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/demos/demo3_modules/src/ModuleTest2.cpp -------------------------------------------------------------------------------- /module/modulelua/src/FunctionTraits.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/module/modulelua/src/FunctionTraits.h -------------------------------------------------------------------------------- /module/modulelua/src/LuaExportFuncs.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/module/modulelua/src/LuaExportFuncs.h -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/WINDOWS_PORT.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/thirdlib/rocksdb-master/WINDOWS_PORT.md -------------------------------------------------------------------------------- /thirdlib/spdlog-master/bench/logs/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore everything in this directory 2 | * 3 | # Except this file 4 | !.gitignore 5 | -------------------------------------------------------------------------------- /cardgame/server/frame/src/ModuleHotSwap.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/cardgame/server/frame/src/ModuleHotSwap.h -------------------------------------------------------------------------------- /cardgame/server/frame/src/ModuleLogin.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/cardgame/server/frame/src/ModuleLogin.cpp -------------------------------------------------------------------------------- /cardgame/tools/protobuf/protobuf-net.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/cardgame/tools/protobuf/protobuf-net.dll -------------------------------------------------------------------------------- /demos/demo2_modulecomponent/src/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/demos/demo2_modulecomponent/src/main.cpp -------------------------------------------------------------------------------- /module/modulelua/src/ModuleLuaExport.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/module/modulelua/src/ModuleLuaExport.cpp -------------------------------------------------------------------------------- /module/modulelua/src/ModuleLuaMachine.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/module/modulelua/src/ModuleLuaMachine.cpp -------------------------------------------------------------------------------- /thirdlib/iniparser-master/html/tab_b.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/thirdlib/iniparser-master/html/tab_b.gif -------------------------------------------------------------------------------- /thirdlib/iniparser-master/html/tab_l.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/thirdlib/iniparser-master/html/tab_l.gif -------------------------------------------------------------------------------- /thirdlib/iniparser-master/html/tab_r.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/thirdlib/iniparser-master/html/tab_r.gif -------------------------------------------------------------------------------- /thirdlib/protobuf-master/CONTRIBUTORS.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/thirdlib/protobuf-master/CONTRIBUTORS.txt -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/arcanist_util/__phutil_library_init__.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /cardgame/server/frame/src/interface/HotSwapPlugin.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/cardgame/server/frame/src/interface/HotSwapPlugin.h -------------------------------------------------------------------------------- /cardgame/server/hotswaplogic/src/ModulePackHero.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/cardgame/server/hotswaplogic/src/ModulePackHero.cpp -------------------------------------------------------------------------------- /demos/demo2_modulecomponent/src/ModuleTestComponent.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/demos/demo2_modulecomponent/src/ModuleTestComponent.h -------------------------------------------------------------------------------- /thirdlib/protobuf-master/src/CMake/pthread_test.cc.in: -------------------------------------------------------------------------------- 1 | #include 2 | int main () 3 | { 4 | int attr = @PTHREAD_TEST@; return attr; 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/_layouts/post.html: -------------------------------------------------------------------------------- 1 | --- 2 | collection: blog 3 | layout: blog 4 | --- 5 | 6 |
7 | {% include post.html %} 8 |
-------------------------------------------------------------------------------- /cardgame/tools/protobuf/protogen.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/examples/README.md: -------------------------------------------------------------------------------- 1 | 1. Compile RocksDB first by executing `make static_lib` in parent dir 2 | 2. Compile all examples: `cd examples/; make all` 3 | -------------------------------------------------------------------------------- /thirdlib/cppformat-master/doc/contents.rst: -------------------------------------------------------------------------------- 1 | ######## 2 | Contents 3 | ######## 4 | 5 | .. toctree:: 6 | :maxdepth: 2 7 | 8 | usage 9 | api 10 | syntax 11 | -------------------------------------------------------------------------------- /thirdlib/lz4-master/examples/.gitignore: -------------------------------------------------------------------------------- 1 | /Makefile.lz4* 2 | /printVersion 3 | /doubleBuffer 4 | /ringBuffer 5 | /ringBufferHC 6 | /lineCompress 7 | /frameCompress 8 | /*.exe 9 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/static/images/tree_example1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/thirdlib/rocksdb-master/docs/static/images/tree_example1.png -------------------------------------------------------------------------------- /thirdlib/iniparser-master/test/ressources/good_ini/spaced.ini: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/static/fonts/LatoLatin-Black.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/thirdlib/rocksdb-master/docs/static/fonts/LatoLatin-Black.woff -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/static/fonts/LatoLatin-Black.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/thirdlib/rocksdb-master/docs/static/fonts/LatoLatin-Black.woff2 -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/static/fonts/LatoLatin-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/thirdlib/rocksdb-master/docs/static/fonts/LatoLatin-Italic.woff -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/static/fonts/LatoLatin-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/thirdlib/rocksdb-master/docs/static/fonts/LatoLatin-Italic.woff2 -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/static/fonts/LatoLatin-Light.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/thirdlib/rocksdb-master/docs/static/fonts/LatoLatin-Light.woff -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/static/fonts/LatoLatin-Light.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/thirdlib/rocksdb-master/docs/static/fonts/LatoLatin-Light.woff2 -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/static/fonts/LatoLatin-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/thirdlib/rocksdb-master/docs/static/fonts/LatoLatin-Regular.woff -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/static/images/pcache-blockindex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/thirdlib/rocksdb-master/docs/static/images/pcache-blockindex.jpg -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/static/images/pcache-fileindex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/thirdlib/rocksdb-master/docs/static/images/pcache-fileindex.jpg -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/static/images/pcache-filelayout.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/thirdlib/rocksdb-master/docs/static/images/pcache-filelayout.jpg -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/static/images/pcache-readiopath.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/thirdlib/rocksdb-master/docs/static/images/pcache-readiopath.jpg -------------------------------------------------------------------------------- /thirdlib/spdlog-master/astyle.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | find . -name "*\.h" -o -name "*\.cpp"|xargs dos2unix 3 | find . -name "*\.h" -o -name "*\.cpp"|xargs astyle -n -c -A1 4 | 5 | 6 | -------------------------------------------------------------------------------- /thirdlib/cppformat-master/support/rtd/index.rst: -------------------------------------------------------------------------------- 1 | If you are not redirected automatically, follow the 2 | `link to the C++ Format documentation `_. 3 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/_layouts/redirect.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/static/fonts/LatoLatin-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/thirdlib/rocksdb-master/docs/static/fonts/LatoLatin-Regular.woff2 -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/static/images/pcache-writeiopath.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/thirdlib/rocksdb-master/docs/static/images/pcache-writeiopath.jpg -------------------------------------------------------------------------------- /thirdlib/iniparser-master/example/twisted-errors.ini: -------------------------------------------------------------------------------- 1 | # 2 | # All of these should trigger syntax errors 3 | # 4 | [section] 5 | hello 6 | world 7 | hello \ 8 | world 9 | a + b ; 10 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/_includes/nav/collection_nav_group_item.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/static/fonts/LatoLatin-BlackItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/thirdlib/rocksdb-master/docs/static/fonts/LatoLatin-BlackItalic.woff -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/static/fonts/LatoLatin-BlackItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/thirdlib/rocksdb-master/docs/static/fonts/LatoLatin-BlackItalic.woff2 -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/static/images/pcache-tieredstorage.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/thirdlib/rocksdb-master/docs/static/images/pcache-tieredstorage.jpg -------------------------------------------------------------------------------- /thirdlib/cppformat-master/support/rtd/conf.py: -------------------------------------------------------------------------------- 1 | # Sphinx configuration for readthedocs. 2 | 3 | import os, sys 4 | 5 | master_doc = 'index' 6 | html_theme = 'theme' 7 | html_theme_path = ["."] 8 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/.clang-format: -------------------------------------------------------------------------------- 1 | # Complete list of style options can be found at: 2 | # http://clang.llvm.org/docs/ClangFormatStyleOptions.html 3 | --- 4 | BasedOnStyle: Google 5 | ... 6 | -------------------------------------------------------------------------------- /base/src/base.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | #include "base.h" 9 | 10 | using namespace ff; -------------------------------------------------------------------------------- /thirdlib/cppformat-master/doc/basic-bootstrap/README: -------------------------------------------------------------------------------- 1 | Sphinx basic theme with Bootstrap support. Modifications are kept to 2 | a minimum to simplify integration in case of changes to Sphinx theming. 3 | -------------------------------------------------------------------------------- /thirdlib/lua-5.3.3/README: -------------------------------------------------------------------------------- 1 | 2 | This is Lua 5.3.3, released on 30 May 2016. 3 | 4 | For installation instructions, license details, and 5 | further information about Lua, see doc/readme.html. 6 | 7 | -------------------------------------------------------------------------------- /thirdlib/protobuf-master/src/CMake/hash_set_test.cc.in: -------------------------------------------------------------------------------- 1 | #include <@LOCATION_SET_I@> 2 | int main () 3 | { 4 | @NAMESPACE_I@::@CLASSNAME_SET_I@ const s; 5 | s.find(1); 6 | return 0; 7 | } 8 | 9 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/tools/rdb/rdb: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | node -e "RDB = require('./build/Release/rdb').DBWrapper; console.log('Loaded rocksdb in variable RDB'); repl = require('repl').start('> ');" 4 | -------------------------------------------------------------------------------- /module/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | cmake_minimum_required(VERSION 2.8) 3 | 4 | set(PROJ_NAME modules) 5 | 6 | add_subdirectory("modulelua") 7 | add_subdirectory("moduleactor") 8 | add_subdirectory("modules") 9 | -------------------------------------------------------------------------------- /thirdlib/cppformat-master/doc/_static/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/thirdlib/cppformat-master/doc/_static/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /thirdlib/cppformat-master/doc/_static/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/thirdlib/cppformat-master/doc/_static/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /thirdlib/iniparser-master/test/ressources/bad_ini/twisted-errors.ini: -------------------------------------------------------------------------------- 1 | # 2 | # All of these should trigger syntax errors 3 | # 4 | [section] 5 | hello 6 | world 7 | hello \ 8 | world 9 | a + b ; 10 | -------------------------------------------------------------------------------- /thirdlib/protobuf-master/src/CMake/hash_map_test.cc.in: -------------------------------------------------------------------------------- 1 | #include <@LOCATION_MAP_I@> 2 | int main () 3 | { 4 | @NAMESPACE_I@::@CLASSNAME_MAP_I@ const m; 5 | m.find(1); 6 | return 0; 7 | } 8 | 9 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/_includes/plugins/button.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bin/cardgame/servcfg.ini: -------------------------------------------------------------------------------- 1 | [server] 2 | ip=127.0.0.1 3 | port=7001 4 | name=server1 5 | 6 | [data] 7 | file=cfg/cfg.data 8 | 9 | [hslogic] 10 | file=./Debug/card_game_logic.dll 11 | tmpdir=./hstmp/ 12 | -------------------------------------------------------------------------------- /bin/cardgame/servcfg_linux.ini: -------------------------------------------------------------------------------- 1 | [server] 2 | ip=127.0.0.1 3 | port=7001 4 | name=server1 5 | 6 | [data] 7 | file=cfg/cfg.data 8 | 9 | [hslogic] 10 | file=../card_game_logic.so 11 | tmpdir=./hstmp/ 12 | -------------------------------------------------------------------------------- /thirdlib/cppformat-master/doc/_static/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/thirdlib/cppformat-master/doc/_static/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /thirdlib/cppformat-master/doc/bootstrap/mixins/center-block.less: -------------------------------------------------------------------------------- 1 | // Center-align a block level element 2 | 3 | .center-block() { 4 | display: block; 5 | margin-left: auto; 6 | margin-right: auto; 7 | } 8 | -------------------------------------------------------------------------------- /thirdlib/cppformat-master/doc/bootstrap/mixins/text-emphasis.less: -------------------------------------------------------------------------------- 1 | // Typography 2 | 3 | .text-emphasis-variant(@color) { 4 | color: @color; 5 | a&:hover { 6 | color: darken(@color, 10%); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /thirdlib/iniparser-master/.travis.yml: -------------------------------------------------------------------------------- 1 | language: c 2 | 3 | env: 4 | - ENV_CC=clang 5 | - ENV_CC=clang++ 6 | - ENV_CC=gcc 7 | - ENV_CC=g++ 8 | 9 | script: CC=$ENV_CC make && CC=$ENV_CC make check 10 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/static/images/Resize-of-20140327_200754-300x225.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elevenxt/FreeEngine/HEAD/thirdlib/rocksdb-master/docs/static/images/Resize-of-20140327_200754-300x225.jpg -------------------------------------------------------------------------------- /cardgame/server/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | cmake_minimum_required(VERSION 2.8) 3 | 4 | set(PROJ_NAME card_game) 5 | 6 | add_subdirectory("frame") 7 | add_subdirectory("hotswaplogic") 8 | add_subdirectory("proto") 9 | 10 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/examples/.gitignore: -------------------------------------------------------------------------------- 1 | c_simple_example 2 | column_families_example 3 | compact_files_example 4 | compaction_filter_example 5 | optimistic_transaction_example 6 | simple_example 7 | transaction_example 8 | -------------------------------------------------------------------------------- /bin/script/test.lua: -------------------------------------------------------------------------------- 1 | 2 | log.trace("this is trace log from lua") 3 | log.debug("this is debug log from lua") 4 | 5 | log.notice("test func1(1,2) = " .. test.func1(1,2)) 6 | log.notice("test func2(1,2) = " .. test.func2(1,2)) 7 | 8 | -------------------------------------------------------------------------------- /thirdlib/cppformat-master/doc/bootstrap/mixins/size.less: -------------------------------------------------------------------------------- 1 | // Sizing shortcuts 2 | 3 | .size(@width; @height) { 4 | width: @width; 5 | height: @height; 6 | } 7 | 8 | .square(@size) { 9 | .size(@size; @size); 10 | } 11 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/_includes/plugins/all_share.html: -------------------------------------------------------------------------------- 1 |
2 | {% include plugins/like_button.html %}{% include plugins/twitter_share.html %}{% include plugins/google_share.html %} 3 |
-------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/_includes/plugins/plugin_row.html: -------------------------------------------------------------------------------- 1 |
2 | {% for child in include.children %} 3 | {% include plugins/{{child.type}}.html href=child.href text=child.text %} 4 | {% endfor %} 5 |
-------------------------------------------------------------------------------- /thirdlib/cppformat-master/doc/bootstrap/mixins/background-variant.less: -------------------------------------------------------------------------------- 1 | // Contextual backgrounds 2 | 3 | .bg-variant(@color) { 4 | background-color: @color; 5 | a&:hover { 6 | background-color: darken(@color, 10%); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /thirdlib/cppformat-master/doc/bootstrap/mixins/opacity.less: -------------------------------------------------------------------------------- 1 | // Opacity 2 | 3 | .opacity(@opacity) { 4 | opacity: @opacity; 5 | // IE8 filter 6 | @opacity-ie: (@opacity * 100); 7 | filter: ~"alpha(opacity=@{opacity-ie})"; 8 | } 9 | -------------------------------------------------------------------------------- /thirdlib/iniparser-master/.gitignore: -------------------------------------------------------------------------------- 1 | ### Ignore all files created by make 2 | # 3 | *.a 4 | *.o 5 | *.so 6 | *.so.* 7 | /example/iniexample 8 | /example/parse 9 | # Autogenerate source file 10 | /test/AllTests.c 11 | /test/testrun 12 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/_includes/plugins/google_share.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 | 6 | -------------------------------------------------------------------------------- /cardgame/server/frame/src/interface/ConstString.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _FF_CONST_STRING_ 3 | #define _FF_CONST_STRING_ 4 | 5 | namespace ff 6 | { 7 | namespace CS 8 | { 9 | static const char* DBTAB_PLAYER = "player"; 10 | } 11 | } 12 | 13 | #endif -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: home 3 | title: RocksDB | A persistent key-value store 4 | id: home 5 | --- 6 | 7 | ## Features 8 | 9 | {% include content/gridblocks.html data_source=site.data.features align="center" %} 10 | -------------------------------------------------------------------------------- /thirdlib/cppformat-master/doc/bootstrap/mixins/text-overflow.less: -------------------------------------------------------------------------------- 1 | // Text overflow 2 | // Requires inline-block or block for proper styling 3 | 4 | .text-overflow() { 5 | overflow: hidden; 6 | text-overflow: ellipsis; 7 | white-space: nowrap; 8 | } 9 | -------------------------------------------------------------------------------- /thirdlib/cppformat-master/doc/bootstrap/mixins/tab-focus.less: -------------------------------------------------------------------------------- 1 | // WebKit-style focus 2 | 3 | .tab-focus() { 4 | // Default 5 | outline: thin dotted; 6 | // WebKit 7 | outline: 5px auto -webkit-focus-ring-color; 8 | outline-offset: -2px; 9 | } 10 | -------------------------------------------------------------------------------- /thirdlib/lua-5.3.3/src/lua.hpp: -------------------------------------------------------------------------------- 1 | // lua.hpp 2 | // Lua header files for C++ 3 | // <> not supplied automatically because Lua also compiles as C++ 4 | 5 | extern "C" { 6 | #include "lua.h" 7 | #include "lualib.h" 8 | #include "lauxlib.h" 9 | } 10 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/_layouts/plain.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 |
6 |
7 | {{ content }} 8 |
9 |
10 | 11 | -------------------------------------------------------------------------------- /module/modulelua/src/ModuleLuaVar.cpp: -------------------------------------------------------------------------------- 1 | 2 | 3 | #include "ModuleLuaVar.h" 4 | 5 | 6 | using namespace ff; 7 | 8 | bool ModuleLuaVar::initialize(ModuleMgr& mgr) 9 | { 10 | return true; 11 | } 12 | 13 | void ModuleLuaVar::finalize() 14 | { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/_layouts/top-level.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 |
6 |
7 | {{ content }} 8 |
9 |
10 | 11 | -------------------------------------------------------------------------------- /thirdlib/cppformat-master/doc/bootstrap/mixins/resize.less: -------------------------------------------------------------------------------- 1 | // Resize anything 2 | 3 | .resizable(@direction) { 4 | resize: @direction; // Options: horizontal, vertical, both 5 | overflow: auto; // Per CSS3 UI, `resize` only applies when `overflow` isn't `visible` 6 | } 7 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/_data/promo.yml: -------------------------------------------------------------------------------- 1 | # This file determines the list of promotional elements added to the header of \ 2 | # your site's homepage. Full list of plugins are shown 3 | 4 | - type: button 5 | href: docs/getting-started.html 6 | text: Get Started 7 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/_layouts/doc_page.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: doc_default 3 | --- 4 | 5 |
6 |
7 | {{ content }} 8 |
9 |
10 | 11 | -------------------------------------------------------------------------------- /thirdlib/cppformat-master/doc/bootstrap/mixins/labels.less: -------------------------------------------------------------------------------- 1 | // Labels 2 | 3 | .label-variant(@color) { 4 | background-color: @color; 5 | 6 | &[href] { 7 | &:hover, 8 | &:focus { 9 | background-color: darken(@color, 10%); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/blog/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | id: blog 3 | title: Blog 4 | layout: blog 5 | category: blog 6 | --- 7 | 8 |
9 | {% for page in site.posts %} 10 | {% include post.html truncate=true %} 11 | {% endfor %} 12 |
13 | -------------------------------------------------------------------------------- /thirdlib/lz4-master/examples/README.md: -------------------------------------------------------------------------------- 1 | # LZ4 examples 2 | 3 | ## Documents 4 | 5 | - [Streaming API Basics](streaming_api_basics.md) 6 | - Examples 7 | - [Double Buffer](blockStreaming_doubleBuffer.md) 8 | - [Line by Line Text Compression](blockStreaming_lineByLine.md) 9 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/_includes/ui/button.html: -------------------------------------------------------------------------------- 1 | {{ include.button_text }} -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/_includes/content/gridblocks.html: -------------------------------------------------------------------------------- 1 |
2 | {% for item in {{include.data_source}} %} 3 | {% include content/items/gridblock.html item=item layout=include.layout imagealign=include.imagealign align=include.align %} 4 | {% endfor %} 5 |
-------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/_layouts/blog.html: -------------------------------------------------------------------------------- 1 | --- 2 | category: blog 3 | layout: blog_default 4 | --- 5 | 6 |
7 |
8 | {{ content }} 9 |
10 |
11 | 12 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/_includes/plugins/iframe.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 |
5 | {% include plugins/button.html href=include.href text=include.text %} 6 |
-------------------------------------------------------------------------------- /thirdlib/rocksdb-master/util/build_version.cc.in: -------------------------------------------------------------------------------- 1 | #include "build_version.h" 2 | const char* rocksdb_build_git_sha = "rocksdb_build_git_sha:@@GIT_SHA@@"; 3 | const char* rocksdb_build_git_date = "rocksdb_build_git_date:@@GIT_DATE_TIME@@"; 4 | const char* rocksdb_build_compile_date = __DATE__; 5 | -------------------------------------------------------------------------------- /thirdlib/iniparser-master/AUTHORS: -------------------------------------------------------------------------------- 1 | Author: Nicolas Devillard 2 | 3 | This tiny library has received countless contributions and I have 4 | not kept track of all the people who contributed. Let them be thanked 5 | for their ideas, code, suggestions, corrections, enhancements! 6 | 7 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/_includes/katex_import.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /thirdlib/cppformat-master/doc/bootstrap/mixins/progress-bar.less: -------------------------------------------------------------------------------- 1 | // Progress bars 2 | 3 | .progress-bar-variant(@color) { 4 | background-color: @color; 5 | 6 | // Deprecated parent class requirement as of v3.2.0 7 | .progress-striped & { 8 | #gradient > .striped(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /thirdlib/iniparser-master/test/ressources/good_ini/spaced2.ini: -------------------------------------------------------------------------------- 1 | 2 | # spaced2.ini 3 | 4 | [blanks] 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | a=1 17 | b=1; 18 | c=1; comment 19 | d=1# comment 20 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/_includes/plugins/ascii_cinema.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /tools/buildproto.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | SET PROTOC=protoc.exe 4 | SET PROTO_DIR=../protos/scripts 5 | SET SERVER_OUTPUT=../protos/code 6 | 7 | FOR %%P IN (%PROTO_DIR%/*.proto) DO ( 8 | %PROTOC% -I%PROTO_DIR% --cpp_out=%SERVER_OUTPUT% %PROTO_DIR%/%%P 9 | @echo Generate From %%P 10 | ) 11 | 12 | pause -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/_layouts/default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {% include head.html %} 4 | 5 | {% include nav.html alwayson=true %} 6 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/_layouts/basic.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: doc_default 3 | --- 4 | 5 |
6 |
7 |
8 | {{ content }} 9 |
10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/doc-type-examples/top-level-example.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: top-level 3 | title: Support Example 4 | id: top-level-example 5 | category: top-level 6 | --- 7 | 8 | This is a static page disconnected from the blog or docs collections that can be added at a top-level (i.e., the same level as `index.md`). 9 | -------------------------------------------------------------------------------- /thirdlib/cppformat-master/.gitignore: -------------------------------------------------------------------------------- 1 | /bin 2 | /_CPack_Packages 3 | /doc/doxyxml 4 | /doc/html 5 | /doc/virtualenv 6 | /Testing 7 | /install_manifest.txt 8 | *~ 9 | *.a 10 | *.zip 11 | cmake_install.cmake 12 | CPack*Config.cmake 13 | CTestTestfile.cmake 14 | CMakeCache.txt 15 | CMakeFiles 16 | Makefile 17 | run-msbuild.bat 18 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/AUTHORS: -------------------------------------------------------------------------------- 1 | Facebook Inc. 2 | Facebook Engineering Team 3 | 4 | Google Inc. 5 | # Initial version authors: 6 | Jeffrey Dean 7 | Sanjay Ghemawat 8 | 9 | # Partial list of contributors: 10 | Kevin Regan 11 | Johan Bilien 12 | -------------------------------------------------------------------------------- /thirdlib/spdlog-master/tests/includes.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | #include "catch.hpp" 11 | #include "../include/spdlog/spdlog.h" 12 | #include "../include/spdlog/sinks/null_sink.h" 13 | -------------------------------------------------------------------------------- /thirdlib/cppformat-master/doc/bootstrap/mixins/nav-divider.less: -------------------------------------------------------------------------------- 1 | // Horizontal dividers 2 | // 3 | // Dividers (basically an hr) within dropdowns and nav lists 4 | 5 | .nav-divider(@color: #e5e5e5) { 6 | height: 1px; 7 | margin: ((@line-height-computed / 2) - 1) 0; 8 | overflow: hidden; 9 | background-color: @color; 10 | } 11 | -------------------------------------------------------------------------------- /thirdlib/cppformat-master/doc/bootstrap/mixins/reset-filter.less: -------------------------------------------------------------------------------- 1 | // Reset filters for IE 2 | // 3 | // When you need to remove a gradient background, do not forget to use this to reset 4 | // the IE filter for IE9 and below. 5 | 6 | .reset-filter() { 7 | filter: e(%("progid:DXImageTransform.Microsoft.gradient(enabled = false)")); 8 | } 9 | -------------------------------------------------------------------------------- /thirdlib/lz4-master/.gitattributes: -------------------------------------------------------------------------------- 1 | # Set the default behavior 2 | * text eol=lf 3 | 4 | # Explicitly declare source files 5 | *.c text eol=lf 6 | *.h text eol=lf 7 | 8 | # Denote files that should not be modified. 9 | *.odt binary 10 | *.png binary 11 | # Visual Studio 12 | *.sln binary 13 | *.suo binary 14 | *.vcxproj* binary 15 | 16 | -------------------------------------------------------------------------------- /thirdlib/iniparser-master/example/twisted-genhuge.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | import os 3 | import sys 4 | 5 | if __name__=="__main__": 6 | f=open('twisted-massive.ini', 'w') 7 | for i in range(100): 8 | f.write('[%03d]\n' % i) 9 | for j in range(100): 10 | f.write('key-%03d=1;\n' % j) 11 | f.close() 12 | 13 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/tools/rdb/rdb.cc: -------------------------------------------------------------------------------- 1 | #ifndef BUILDING_NODE_EXTENSION 2 | #define BUILDING_NODE_EXTENSION 3 | #endif 4 | 5 | #include 6 | #include 7 | #include "db_wrapper.h" 8 | 9 | using namespace v8; 10 | 11 | void InitAll(Handle exports) { 12 | DBWrapper::Init(exports); 13 | } 14 | 15 | NODE_MODULE(rdb, InitAll) 16 | -------------------------------------------------------------------------------- /thirdlib/cppformat-master/doc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | find_program(DOXYGEN doxygen) 2 | if (NOT DOXYGEN) 3 | message(STATUS "Target 'doc' disabled (requires doxygen)") 4 | return () 5 | endif () 6 | 7 | add_custom_target(doc COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/build.py) 8 | 9 | install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/ DESTINATION share/doc/cppformat) 10 | -------------------------------------------------------------------------------- /thirdlib/lua-5.3.3/doc/index.css: -------------------------------------------------------------------------------- 1 | ul { 2 | list-style-type: none ; 3 | } 4 | 5 | ul.contents { 6 | padding: 0 ; 7 | } 8 | 9 | table { 10 | border: none ; 11 | border-spacing: 0 ; 12 | border-collapse: collapse ; 13 | } 14 | 15 | td { 16 | vertical-align: top ; 17 | padding: 0 ; 18 | text-align: left ; 19 | line-height: 1.25 ; 20 | width: 15% ; 21 | } 22 | -------------------------------------------------------------------------------- /thirdlib/cppformat-master/support/cmake/FindSetEnv.cmake: -------------------------------------------------------------------------------- 1 | # A CMake script to find SetEnv.cmd. 2 | 3 | find_program(WINSDK_SETENV NAMES SetEnv.cmd 4 | PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows;CurrentInstallFolder]/bin") 5 | if (WINSDK_SETENV AND PRINT_PATH) 6 | execute_process(COMMAND ${CMAKE_COMMAND} -E echo "${WINSDK_SETENV}") 7 | endif () 8 | -------------------------------------------------------------------------------- /thirdlib/cppformat-master/doc/bootstrap/mixins/alerts.less: -------------------------------------------------------------------------------- 1 | // Alerts 2 | 3 | .alert-variant(@background; @border; @text-color) { 4 | background-color: @background; 5 | border-color: @border; 6 | color: @text-color; 7 | 8 | hr { 9 | border-top-color: darken(@border, 5%); 10 | } 11 | .alert-link { 12 | color: darken(@text-color, 10%); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /module/modulelua/src/luavar.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | #ifndef _UTS_LUAVAR_ 9 | #define _UTS_LUAVAR_ 10 | 11 | #include "lua.hpp" 12 | 13 | namespace ff 14 | { 15 | class LuaVar 16 | { 17 | public: 18 | static void pushVarMt(lua_State* L); 19 | }; 20 | } 21 | 22 | #endif -------------------------------------------------------------------------------- /base/src/Timer.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | #ifndef _FF_TIMER_ 9 | #define _FF_TIMER_ 10 | 11 | #include 12 | #include 13 | 14 | 15 | namespace ff 16 | { 17 | class Timer 18 | { 19 | public: 20 | static int64_t getTickCount(); 21 | }; 22 | } 23 | 24 | #endif -------------------------------------------------------------------------------- /thirdlib/iniparser-master/doc/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # iniparser doc Makefile 3 | # 4 | 5 | all: html 6 | 7 | html: 8 | doxygen iniparser.dox 9 | rm -f ../html/annotated.html 10 | rm -f ../html/classes.html 11 | rm -f ../html/doxygen.gif 12 | rm -f ../html/files.html 13 | rm -f ../html/functions.html 14 | rm -f ../html/globals.html 15 | rm -f ../html/iniparser_main.html 16 | 17 | -------------------------------------------------------------------------------- /thirdlib/lua-5.3.3/doc/manual.css: -------------------------------------------------------------------------------- 1 | h3 code { 2 | font-family: inherit ; 3 | font-size: inherit ; 4 | } 5 | 6 | pre, code { 7 | font-size: 12pt ; 8 | } 9 | 10 | span.apii { 11 | color: gray ; 12 | float: right ; 13 | font-family: inherit ; 14 | font-style: normal ; 15 | font-size: small ; 16 | } 17 | 18 | h2:before { 19 | content: "" ; 20 | padding-right: 0em ; 21 | } 22 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/third-party/fbson/COMMIT.md: -------------------------------------------------------------------------------- 1 | fbson commit: 2 | https://github.com/facebook/mysql-5.6/commit/55ef9ff25c934659a70b4094e9b406c48e9dd43d 3 | 4 | # TODO. 5 | * Had to convert zero sized array to [1] sized arrays due to the fact that MS Compiler complains about it not being standard. At some point need to contribute this change back to MySql where this code was taken from. 6 | -------------------------------------------------------------------------------- /thirdlib/lz4-master/examples/printVersion.c: -------------------------------------------------------------------------------- 1 | // LZ4 trivial example : print Library version number 2 | // Copyright : Takayuki Matsuoka & Yann Collet 3 | 4 | 5 | #include 6 | #include "lz4.h" 7 | 8 | int main(int argc, char** argv) 9 | { 10 | (void)argc; (void)argv; 11 | printf("Hello World ! LZ4 Library version = %d\n", LZ4_versionNumber()); 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/tools/rocksdb_dump_test.sh: -------------------------------------------------------------------------------- 1 | TESTDIR=`mktemp -d /tmp/rocksdb-dump-test.XXXXX` 2 | DUMPFILE="tools/sample-dump.dmp" 3 | 4 | # Verify that the sample dump file is undumpable and then redumpable. 5 | ./rocksdb_undump --dump_location=$DUMPFILE --db_path=$TESTDIR/db 6 | ./rocksdb_dump --anonymous --db_path=$TESTDIR/db --dump_location=$TESTDIR/dump 7 | cmp $DUMPFILE $TESTDIR/dump 8 | -------------------------------------------------------------------------------- /thirdlib/spdlog-master/INSTALL: -------------------------------------------------------------------------------- 1 | spdlog is header only library. 2 | Just copy the files to your build tree and use a C++11 compiler 3 | 4 | Tested on: 5 | gcc 4.8.1 and above 6 | clang 3.5 7 | Visual Studio 2013 8 | 9 | gcc 4.8 flags: --std==c++11 -pthread -O3 -flto -Wl,--no-as-needed 10 | gcc 4.9 flags: --std=c++11 -pthread -O3 -flto 11 | 12 | 13 | see the makefile in the example folder 14 | -------------------------------------------------------------------------------- /thirdlib/ut/lib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | cmake_minimum_required(VERSION 2.8) 3 | 4 | set(PROJ_NAME ut) 5 | file(GLOB SRCLIST *.c *.h) 6 | 7 | add_library(${PROJ_NAME} ${SRCLIST}) 8 | 9 | include_directories( "../otherlib/include" ) 10 | 11 | target_link_libraries(${PROJ_NAME} 12 | ${dl} 13 | ${pthread} 14 | ) 15 | 16 | set_target_properties(${PROJ_NAME} PROPERTIES FOLDER "libs") 17 | 18 | -------------------------------------------------------------------------------- /thirdlib/ut/lib/ut_error.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** simple net lib for windows and linux 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in ut_def.h 5 | */ 6 | 7 | 8 | 9 | #ifndef __UT_ERROR_H_ 10 | #define __UT_ERROR_H_ 11 | 12 | #include "ut_def.h" 13 | 14 | __C_BEGIN_DECLS 15 | 16 | 17 | int32_t ut_lasterror(); 18 | int32_t ut_wsalasterror(); 19 | 20 | __C_END_DECLS 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /thirdlib/cppformat-master/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | include $(CLEAR_VARS) 3 | 4 | LOCAL_MODULE := cppformat_static 5 | LOCAL_MODULE_FILENAME := libcppformat 6 | 7 | LOCAL_SRC_FILES := format.cc 8 | 9 | LOCAL_C_INCLUDES := $(LOCAL_PATH) 10 | LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) 11 | 12 | LOCAL_CFLAGS += -std=c++11 -fexceptions 13 | 14 | include $(BUILD_STATIC_LIBRARY) 15 | 16 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/java/jdb_bench.sh: -------------------------------------------------------------------------------- 1 | PLATFORM=64 2 | if [ `getconf LONG_BIT` != "64" ] 3 | then 4 | PLATFORM=32 5 | fi 6 | 7 | ROCKS_JAR=`find target -name rocksdbjni*.jar` 8 | 9 | echo "Running benchmark in $PLATFORM-Bit mode." 10 | java -server -d$PLATFORM -XX:NewSize=4m -XX:+AggressiveOpts -Djava.library.path=target -cp "${ROCKS_JAR}:benchmark/target/classes" org.rocksdb.benchmark.DbBenchmark $@ 11 | -------------------------------------------------------------------------------- /base/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | cmake_minimum_required(VERSION 2.8) 3 | 4 | set(PROJ_NAME base) 5 | file(GLOB SRCLIST ./src/*.*) 6 | 7 | add_library(${PROJ_NAME} ${SRCLIST}) 8 | 9 | include_directories( 10 | ${THIRDLIB_DIR}/ut/lib 11 | ${THIRDLIB_DIR}/cppformat-master 12 | ) 13 | 14 | target_link_libraries(${PROJ_NAME} 15 | ut 16 | ) 17 | 18 | set_target_properties(${PROJ_NAME} PROPERTIES FOLDER "core") 19 | 20 | -------------------------------------------------------------------------------- /base/src/LogConsole.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | #ifndef _FF_LOG_CONSOLE_ 9 | #define _FF_LOG_CONSOLE_ 10 | 11 | #include "ILog.h" 12 | 13 | namespace ff 14 | { 15 | /*打印日志到控制台*/ 16 | class LogConsole : public Log 17 | { 18 | public: 19 | bool doLog(LogLevel level, const std::string& msg); 20 | }; 21 | } 22 | #endif -------------------------------------------------------------------------------- /thirdlib/cppformat-master/appveyor.yml: -------------------------------------------------------------------------------- 1 | configuration: 2 | - Debug 3 | - Release 4 | 5 | environment: 6 | CTEST_OUTPUT_ON_FAILURE: 1 7 | matrix: 8 | - BUILD: msvc 9 | - BUILD: msvc 10 | PLATFORM: x64 11 | - BUILD: mingw 12 | 13 | build_script: 14 | - python support/appveyor-build.py 15 | 16 | on_failure: 17 | - appveyor PushArtifact Testing/Temporary/LastTest.log 18 | - appveyor AddTest test 19 | -------------------------------------------------------------------------------- /module/moduleactor/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | cmake_minimum_required(VERSION 2.8) 3 | 4 | set(PROJ_NAME moduleactor) 5 | file(GLOB SRCLIST ./src/*.*) 6 | 7 | add_library(${PROJ_NAME} ${SRCLIST}) 8 | 9 | include_directories( 10 | ${BASE_DIR}/src 11 | ${MODULE_DIR}/common 12 | ${THIRDLIB_DIR}/cppformat-master 13 | ${THIRDLIB_DIR}/spdlog-master/include/spdlog 14 | ) 15 | 16 | set_target_properties(${PROJ_NAME} PROPERTIES FOLDER "modules") -------------------------------------------------------------------------------- /module/modules/src/NetPeer.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | #include "NetPeer.h" 9 | 10 | 11 | using namespace ff; 12 | 13 | 14 | NetPeer::NetPeer() 15 | { 16 | mSock = ut_sock_invalid(); 17 | mIdx = -1; 18 | } 19 | 20 | NetPeer::NetPeer(std::string name) 21 | { 22 | mSock = ut_sock_invalid(); 23 | mIdx = -1; 24 | mName = name; 25 | } -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/doc-type-examples/docs-hello-world.md: -------------------------------------------------------------------------------- 1 | --- 2 | docid: hello-world 3 | title: Hello, World! 4 | layout: docs 5 | permalink: /docs/hello-world.html 6 | --- 7 | 8 | Any local docs would go in the `_docs` directory. 9 | 10 | ## No documentation? 11 | 12 | If you have no documentation for your site, you can remove the entire `_docs` folder. Otherwise add markdown files in here. See CONTRIBUTING.md for details. 13 | -------------------------------------------------------------------------------- /thirdlib/spdlog-master/bench/glog-bench.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "glog/logging.h" 3 | 4 | 5 | int main(int, char* argv[]) 6 | { 7 | int howmany = 1000000; 8 | 9 | 10 | FLAGS_logtostderr = 0; 11 | FLAGS_log_dir = "logs"; 12 | google::InitGoogleLogging(argv[0]); 13 | for(int i = 0 ; i < howmany; ++i) 14 | LOG(INFO) << "glog message # " << i << ": This is some text for your pleasure"; 15 | 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /module/modulenetservice/src/NetPeer.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | #include "NetPeer.h" 9 | 10 | 11 | using namespace ff; 12 | 13 | 14 | NetPeer::NetPeer() 15 | { 16 | mSock = ut_sock_invalid(); 17 | mIdx = -1; 18 | } 19 | 20 | NetPeer::NetPeer(std::string name) 21 | { 22 | mSock = ut_sock_invalid(); 23 | mIdx = -1; 24 | mName = name; 25 | } -------------------------------------------------------------------------------- /thirdlib/iniparser-master/INSTALL: -------------------------------------------------------------------------------- 1 | 2 | iniParser installation instructions 3 | ----------------------------------- 4 | 5 | - Modify the Makefile to suit your environment. 6 | - Type 'make' to make the library. 7 | - Type 'make check' to make the test program. 8 | - Type 'test/iniexample' to launch the test program. 9 | - Type 'test/parse' to launch torture tests. 10 | 11 | 12 | 13 | Enjoy! 14 | N. Devillard 15 | Wed Mar 2 21:14:17 CET 2011 16 | -------------------------------------------------------------------------------- /cardgame/server/proto/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | cmake_minimum_required(VERSION 2.8) 3 | 4 | set(PROJ_NAME card_game_proto) 5 | file(GLOB SRCLIST ./*.h ./*.cpp ./*.cc) 6 | 7 | include_directories( 8 | ${BASE_DIR}/src 9 | ${THIRDLIB_DIR}/protobuf-master/src 10 | ) 11 | 12 | add_library(${PROJ_NAME} ${SRCLIST}) 13 | 14 | target_link_libraries(${PROJ_NAME} 15 | protobuf 16 | ) 17 | 18 | set_target_properties(${PROJ_NAME} PROPERTIES FOLDER "game.card") 19 | -------------------------------------------------------------------------------- /cardgame/tools/exportcfg/exportdata.py: -------------------------------------------------------------------------------- 1 | 2 | import os 3 | 4 | class ExportData: 5 | @staticmethod 6 | def export(efile, data): 7 | strv = '' 8 | for i in range(3, len(data)): 9 | r = data[i] 10 | val = '#'.join(r) 11 | if '$' in val: 12 | print('excell can not contain character "#"') 13 | assert False 14 | strv += val + '$' 15 | 16 | return strv -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/hdfs/setup.sh: -------------------------------------------------------------------------------- 1 | export USE_HDFS=1 2 | export LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/amd64/server:$JAVA_HOME/jre/lib/amd64:/usr/lib/hadoop/lib/native 3 | 4 | export CLASSPATH= 5 | for f in `find /usr/lib/hadoop-hdfs | grep jar`; do export CLASSPATH=$CLASSPATH:$f; done 6 | for f in `find /usr/lib/hadoop | grep jar`; do export CLASSPATH=$CLASSPATH:$f; done 7 | for f in `find /usr/lib/hadoop/client | grep jar`; do export CLASSPATH=$CLASSPATH:$f; done 8 | -------------------------------------------------------------------------------- /thirdlib/spdlog-master/bench/easyl.conf: -------------------------------------------------------------------------------- 1 | * GLOBAL: 2 | FORMAT = "[%datetime]: %msg" 3 | FILENAME = ./logs/easylogging.log 4 | ENABLED = true 5 | TO_FILE = true 6 | TO_STANDARD_OUTPUT = false 7 | MILLISECONDS_WIDTH = 3 8 | PERFORMANCE_TRACKING = false 9 | MAX_LOG_FILE_SIZE = 10485760 10 | Log_Flush_Threshold = 10485760 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 欢迎加入交流qq群569821865 2 | 3 | # FreeEngine 4 | 一款开源的游戏服务端引擎,底层框架使用C++编写,核心概念少,易上手,学习成本低。整个架构基于模块机制, 5 | 注重模块的可复用性,降低功能逻辑耦合。脚本、网络、数据库等支持都是通过模块提供。 6 | 该引擎并不是为某一种网游类型设计,它更注重单个服务器架构设计,通过不同的模块组合,引擎适用于所有网络游戏类型。 7 | 8 | 该引擎设计目标为: 9 | 1. 简单、实用、易上手、方便、快捷、低耦合 10 | 2. 通过对已有模块的重组,快速构建服务器框架和功能逻辑 11 | 3. 提供丰富、稳定、高可复用的模块代码 12 | 13 | # 特性 14 | 1. 跨平台,目前支持linux和windows系统 15 | 2. 核心概念少,学习成本低,易上手 16 | 3. 模块机制 17 | 4. 所有其它特性可通过模块实现(网络、数据库、脚本支持等) 18 | -------------------------------------------------------------------------------- /demos/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | cmake_minimum_required(VERSION 2.8) 3 | 4 | set(PROJ_NAME demos) 5 | 6 | add_subdirectory("demo1_module") 7 | add_subdirectory("demo2_modulecomponent") 8 | add_subdirectory("demo3_modules") 9 | 10 | add_subdirectory("demo4_lua") 11 | add_subdirectory("demo5_netserver") 12 | add_subdirectory("demo5_netclient") 13 | add_subdirectory("demo6_actor") 14 | add_subdirectory("demo7_chatclient") 15 | add_subdirectory("demo7_chatserver") 16 | 17 | -------------------------------------------------------------------------------- /module/modulelua/src/ModuleLuaVar.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | 9 | #ifndef _US_MODULE_LUAVAR_ 10 | #define _US_MODULE_LUAVAR_ 11 | 12 | #include "IModule.h" 13 | 14 | namespace ff 15 | { 16 | class ModuleLuaVar : public IModule 17 | { 18 | public: 19 | virtual bool initialize(ModuleMgr& mgr); 20 | virtual void finalize(); 21 | }; 22 | } 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /thirdlib/cppformat-master/doc/bootstrap/mixins/nav-vertical-align.less: -------------------------------------------------------------------------------- 1 | // Navbar vertical align 2 | // 3 | // Vertically center elements in the navbar. 4 | // Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin. 5 | 6 | .navbar-vertical-align(@element-height) { 7 | margin-top: ((@navbar-height - @element-height) / 2); 8 | margin-bottom: ((@navbar-height - @element-height) / 2); 9 | } 10 | -------------------------------------------------------------------------------- /thirdlib/ut/lib/ut_memory.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** simple net lib for windows and linux 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in ut_def.h 5 | */ 6 | 7 | 8 | 9 | #include "ut_memory.h" 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | 16 | void* ut_new(int32_t size) 17 | { 18 | void* p = malloc(size); 19 | memset(p, 0, size); 20 | return p; 21 | } 22 | 23 | void ut_delete(void* ptr) 24 | { 25 | free(ptr); 26 | } -------------------------------------------------------------------------------- /module/modulelua/src/ModuleLuaExport.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | 9 | #ifndef _US_MODULE_LUAEXPORT_ 10 | #define _US_MODULE_LUAEXPORT_ 11 | 12 | #include "IModule.h" 13 | 14 | namespace ff 15 | { 16 | class ModuleLuaExport : public IModule 17 | { 18 | public: 19 | virtual bool initialize(ModuleMgr& mgr); 20 | virtual void finalize(); 21 | }; 22 | } 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /thirdlib/cppformat-master/doc/bootstrap/mixins/responsive-visibility.less: -------------------------------------------------------------------------------- 1 | // Responsive utilities 2 | 3 | // 4 | // More easily include all the states for responsive-utilities.less. 5 | .responsive-visibility() { 6 | display: block !important; 7 | table& { display: table; } 8 | tr& { display: table-row !important; } 9 | th&, 10 | td& { display: table-cell !important; } 11 | } 12 | 13 | .responsive-invisibility() { 14 | display: none !important; 15 | } 16 | -------------------------------------------------------------------------------- /thirdlib/lz4-master/lib/liblz4.pc.in: -------------------------------------------------------------------------------- 1 | # LZ4 - Fast LZ compression algorithm 2 | # Copyright (C) 2011-2014, Yann Collet. 3 | # BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) 4 | 5 | prefix=@PREFIX@ 6 | libdir=@LIBDIR@ 7 | includedir=@INCLUDEDIR@ 8 | 9 | Name: lz4 10 | Description: fast lossless compression algorithm library 11 | URL: http://code.google.com/p/lz4/ 12 | Version: @VERSION@ 13 | Libs: -L@LIBDIR@ -llz4 14 | Cflags: -I@INCLUDEDIR@ 15 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/port/README: -------------------------------------------------------------------------------- 1 | This directory contains interfaces and implementations that isolate the 2 | rest of the package from platform details. 3 | 4 | Code in the rest of the package includes "port.h" from this directory. 5 | "port.h" in turn includes a platform specific "port_.h" file 6 | that provides the platform specific implementation. 7 | 8 | See port_posix.h for an example of what must be provided in a platform 9 | specific header file. 10 | 11 | -------------------------------------------------------------------------------- /module/modulenetservice/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | cmake_minimum_required(VERSION 2.8) 3 | 4 | set(PROJ_NAME modulenetservice) 5 | file(GLOB SRCLIST ./src/*.*) 6 | 7 | add_library(${PROJ_NAME} ${SRCLIST}) 8 | 9 | include_directories( 10 | ${BASE_DIR}/src 11 | ${MODULE_DIR}/common 12 | ${THIRDLIB_DIR}/cppformat-master 13 | ${THIRDLIB_DIR}/spdlog-master/include/spdlog 14 | ${THIRDLIB_DIR}/ut/lib 15 | ) 16 | 17 | set_target_properties(${PROJ_NAME} PROPERTIES FOLDER "modules") 18 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/include/rocksdb/db_bench_tool.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013-present, Facebook, Inc. All rights reserved. 2 | // This source code is licensed under the BSD-style license found in the 3 | // LICENSE file in the root directory of this source tree. An additional grant 4 | // of patent rights can be found in the PATENTS file in the same directory. 5 | #pragma once 6 | 7 | namespace rocksdb { 8 | int db_bench_tool(int argc, char** argv); 9 | } // namespace rocksdb 10 | -------------------------------------------------------------------------------- /base/src/NonCopyable.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | 9 | #ifndef _FF_NONCOPYABLE_ 10 | #define _FF_NONCOPYABLE_ 11 | 12 | namespace ff 13 | { 14 | struct NonCopyable 15 | { 16 | public: 17 | NonCopyable() = default; 18 | private: 19 | NonCopyable & operator=(const NonCopyable&) = delete; 20 | NonCopyable(const NonCopyable&) = delete; 21 | }; 22 | } 23 | 24 | #endif 25 | 26 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/include/rocksdb/utilities/convenience.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011-present, Facebook, Inc. All rights reserved. 2 | // This source code is licensed under the BSD-style license found in the 3 | // LICENSE file in the root directory of this source tree. An additional grant 4 | // of patent rights can be found in the PATENTS file in the same directory. 5 | 6 | #pragma once 7 | 8 | // This file was moved to rocksdb/convenience.h" 9 | 10 | #include "rocksdb/convenience.h" 11 | -------------------------------------------------------------------------------- /base/src/Timer.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | #include "Timer.h" 9 | 10 | using namespace ff; 11 | 12 | int64_t Timer::getTickCount() 13 | { 14 | static const std::chrono::steady_clock::time_point ApplicationStartTime = std::chrono::steady_clock::now(); 15 | return int64_t(std::chrono::duration_cast(std::chrono::steady_clock::now() - ApplicationStartTime).count()); 16 | } -------------------------------------------------------------------------------- /thirdlib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | cmake_minimum_required(VERSION 2.8) 3 | 4 | set(PROJ_NAME deps) 5 | 6 | file(GLOB LZ4 lz4-master/lib/*.h lz4-master/lib/*.c) 7 | add_library(lz4 ${LZ4}) 8 | 9 | file(GLOB INIPARSER iniparser-master/src/*.h iniparser-master/src/*.c) 10 | add_library(iniparser ${INIPARSER}) 11 | 12 | add_subdirectory("cppformat-master") 13 | add_subdirectory("protobuf-master") 14 | add_subdirectory("rocksdb-master") 15 | add_subdirectory("lua-5.3.3") 16 | add_subdirectory("ut") 17 | -------------------------------------------------------------------------------- /thirdlib/protobuf-master/protobuf-lite.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: Protocol Buffers 7 | Description: Google's Data Interchange Format 8 | Version: @VERSION@ 9 | Libs: -L${libdir} -lprotobuf-lite @PTHREAD_CFLAGS@ @PTHREAD_LIBS@ 10 | Cflags: -I${includedir} @PTHREAD_CFLAGS@ 11 | # Commented out because it crashes pkg-config *sigh*: 12 | # http://bugs.freedesktop.org/show_bug.cgi?id=13265 13 | # Conflicts: protobuf 14 | -------------------------------------------------------------------------------- /thirdlib/spdlog-master/bench/easylogging-bench.cpp: -------------------------------------------------------------------------------- 1 | #include "easylogging++.h" 2 | 3 | _INITIALIZE_EASYLOGGINGPP 4 | 5 | int main(int, char* []) 6 | { 7 | int howmany = 1000000; 8 | 9 | // Load configuration from file 10 | el::Configurations conf("easyl.conf"); 11 | el::Loggers::reconfigureLogger("default", conf); 12 | 13 | for(int i = 0 ; i < howmany; ++i) 14 | LOG(INFO) << "easylog message #" << i << ": This is some text for your pleasure"; 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /demos/demo1_module/src/ModuleTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | 9 | #ifndef _US_MODULE_TEST_ 10 | #define _US_MODULE_TEST_ 11 | 12 | #include "IModule.h" 13 | 14 | namespace ff 15 | { 16 | namespace demo 17 | { 18 | class ModuleTest : public ff::IModule 19 | { 20 | public: 21 | virtual bool initialize(ModuleMgr& mgr); 22 | virtual void finalize(); 23 | }; 24 | } 25 | } 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /thirdlib/protobuf-master/protobuf.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: Protocol Buffers 7 | Description: Google's Data Interchange Format 8 | Version: @VERSION@ 9 | Libs: -L${libdir} -lprotobuf @LIBS@ @PTHREAD_CFLAGS@ @PTHREAD_LIBS@ 10 | Cflags: -I${includedir} @PTHREAD_CFLAGS@ 11 | # Commented out because it crashes pkg-config *sigh*: 12 | # http://bugs.freedesktop.org/show_bug.cgi?id=13265 13 | # Conflicts: protobuf-lite 14 | -------------------------------------------------------------------------------- /thirdlib/spdlog-master/tests/Makefile: -------------------------------------------------------------------------------- 1 | CXX ?= g++ 2 | CXXFLAGS = -Wall -pedantic -std=c++11 -pthread -O2 3 | LDPFALGS = -pthread 4 | 5 | CPP_FILES := $(wildcard *.cpp) 6 | OBJ_FILES := $(addprefix ./,$(notdir $(CPP_FILES:.cpp=.o))) 7 | 8 | 9 | tests: $(OBJ_FILES) 10 | $(CXX) $(CXXFLAGS) $(LDPFALGS) -o $@ $^ 11 | mkdir -p logs 12 | 13 | %.o: %.cpp 14 | $(CXX) $(CXXFLAGS) -c -o $@ $< 15 | 16 | clean: 17 | rm -f tests *.o logs/*.txt 18 | 19 | rebuild: clean tests 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /cardgame/server/frame/src/ReloadCfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | #ifndef _FF_RELOADABLE_CFG_ 9 | #define _FF_RELOADABLE_CFG_ 10 | 11 | #include "Reloadable.h" 12 | 13 | namespace ff 14 | { 15 | class ReloadCfg : public Reloadable 16 | { 17 | public: 18 | ReloadCfg(std::string fname) : Reloadable(fname) {} 19 | virtual bool doReload(); 20 | virtual void confirmReload(); 21 | }; 22 | } 23 | 24 | #endif -------------------------------------------------------------------------------- /demos/demo1_module/src/ModuleTest.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | 9 | #include "ModuleTest.h" 10 | #include "base.h" 11 | 12 | 13 | using namespace ff::demo; 14 | using namespace ff; 15 | 16 | bool ModuleTest::initialize(ModuleMgr& mgr) 17 | { 18 | SYSLOG_DEBUG("ModuleTest initialize."); 19 | return true; 20 | } 21 | 22 | void ModuleTest::finalize() 23 | { 24 | SYSLOG_DEBUG("ModuleTest finalize."); 25 | } 26 | -------------------------------------------------------------------------------- /module/moduleactor/src/ActorWork.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | #include "ActorWork.h" 9 | 10 | using namespace ff; 11 | 12 | void ActorWork::setCallback(std::function callback, int32_t timeout) 13 | { 14 | mCallback = callback; 15 | mTimeout = timeout; 16 | mTimeLeft = timeout; 17 | } 18 | 19 | void ActorWork::doCallback() 20 | { 21 | if (mCallback) 22 | { 23 | mCallback(this); 24 | } 25 | } -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/_layouts/blog_default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {% include head.html %} 4 | 5 | {% include nav.html alwayson=true %} 6 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /cardgame/tools/exportcfg/exportsep.py: -------------------------------------------------------------------------------- 1 | 2 | import os 3 | 4 | class ExportSep: 5 | @staticmethod 6 | def export(efile, data, targetdir): 7 | ofilename = '{}/{}.csv'.format(targetdir, efile) 8 | print 'out put csv file {}'.format(ofilename) 9 | ofile = open(ofilename, 'w') 10 | for i in xrange(3, len(data)): 11 | r = data[i] 12 | val = '#'.join(r) 13 | ofile.write(val.encode('utf8')) 14 | ofile.write('$\n') 15 | 16 | ofile.close() -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/_includes/plugins/github_star.html: -------------------------------------------------------------------------------- 1 |
2 | Star 3 |
4 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/_includes/plugins/github_watch.html: -------------------------------------------------------------------------------- 1 |
2 | Watch 3 |
4 | -------------------------------------------------------------------------------- /thirdlib/ut/lib/ut_memory.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** simple net lib for windows and linux 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in ut_def.h 5 | */ 6 | 7 | 8 | 9 | #ifndef _UT_MEMORY_H_ 10 | #define _UT_MEMORY_H_ 11 | 12 | #include "ut_def.h" 13 | 14 | void* ut_new(int32_t size); 15 | void ut_delete(void* ptr); 16 | 17 | #define UT_NEW(T) (T*)ut_new(sizeof(T)) 18 | #define UT_NEW_ARRAY(T, num) (T*)ut_new(sizeof(T)*num) 19 | #define UT_DELETE(PTR) {ut_delete((void*)PTR);PTR=0;} 20 | 21 | 22 | #endif -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/_layouts/home.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {% include head.html %} 4 | 5 | {% include nav.html alwayson=true %} 6 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /base/src/Scheduler.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | #ifndef _FF_SCHEDULER_ 9 | #define _FF_SCHEDULER_ 10 | 11 | #include 12 | #include 13 | 14 | namespace ff 15 | { 16 | /* class Scheduler 17 | { 18 | public: 19 | 20 | }; 21 | 22 | class SchedulerGroup 23 | { 24 | 25 | }; 26 | 27 | class SchedulerFactory { 28 | public: 29 | Scheduler getScheduler(SchedulerGroup group); 30 | };*/ 31 | } 32 | 33 | #endif -------------------------------------------------------------------------------- /thirdlib/spdlog-master/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files 2 | *.slo 3 | *.lo 4 | *.o 5 | *.obj 6 | 7 | # Compiled Dynamic libraries 8 | *.so 9 | *.dylib 10 | *.dll 11 | 12 | # Compiled Static libraries 13 | *.lai 14 | *.la 15 | *.a 16 | *.lib 17 | 18 | # Executables 19 | *.exe 20 | *.out 21 | *.app 22 | 23 | # Codelite 24 | .codelite 25 | 26 | # .orig files 27 | *.orig 28 | 29 | # example files 30 | example/* 31 | !example/example.cpp 32 | !example/utils.h 33 | !example/makefile 34 | !example/makefile.clang 35 | 36 | 37 | -------------------------------------------------------------------------------- /launcher/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | cmake_minimum_required(VERSION 2.8) 3 | 4 | set(PROJ_NAME launcher) 5 | file(GLOB SRCLIST ./src/*.*) 6 | 7 | add_library(${PROJ_NAME} ${SRCLIST}) 8 | 9 | include_directories( 10 | ./src 11 | ${BASE_DIR}/src 12 | ${THIRDLIB_DIR}/ut/lib 13 | ${THIRDLIB_DIR}/cppformat-master 14 | ${THIRDLIB_DIR}/spdlog-master/include/spdlog 15 | ${THIRDLIB_DIR}/rapidjson-master/include 16 | ) 17 | 18 | target_link_libraries(${PROJ_NAME} base) 19 | 20 | set_target_properties(${PROJ_NAME} PROPERTIES FOLDER "core") 21 | -------------------------------------------------------------------------------- /thirdlib/cppformat-master/support/cmake/run-cmake.bat: -------------------------------------------------------------------------------- 1 | @echo on 2 | rem This scripts configures build environment and runs CMake. 3 | rem Use it instead of running CMake directly when building with 4 | rem the Microsoft SDK toolchain rather than Visual Studio. 5 | rem It is used in the same way as cmake, for example: 6 | rem 7 | rem run-cmake -G "Visual Studio 10 Win64" . 8 | 9 | for /F "delims=" %%i IN ('cmake "-DPRINT_PATH=1" -P %~dp0/FindSetEnv.cmake') DO set setenv=%%i 10 | if NOT "%setenv%" == "" call "%setenv%" 11 | cmake %* 12 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/_includes/plugins/twitter_share.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | -------------------------------------------------------------------------------- /base/src/ReloadMgr.cpp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | #include "ReloadMgr.h" 5 | 6 | using namespace ff; 7 | 8 | bool ReloadMgr::addReloadable(std::shared_ptr item) 9 | { 10 | mReloadables.push_back(item); 11 | return true; 12 | } 13 | 14 | void ReloadMgr::makeReload() 15 | { 16 | for (std::shared_ptr ritem : mReloadables) 17 | { 18 | ritem->tryReload(); 19 | } 20 | } 21 | 22 | void ReloadMgr::confirmReload() 23 | { 24 | for (std::shared_ptr ritem : mReloadables) 25 | { 26 | ritem->confirmReload(); 27 | } 28 | } -------------------------------------------------------------------------------- /base/src/Spinlock.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | #ifndef _FF_SPINLOCK_ 9 | #define _FF_SPINLOCK_ 10 | 11 | #include 12 | #include 13 | 14 | namespace ff 15 | { 16 | // 自旋锁 17 | class Spinlock 18 | { 19 | public: 20 | Spinlock(); 21 | bool isValidate(); 22 | bool trylock(); 23 | void lock(); 24 | void unlock(); 25 | 26 | private: 27 | std::shared_ptr> mValue; 28 | }; 29 | } 30 | 31 | #endif -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/_includes/plugins/twitter_follow.html: -------------------------------------------------------------------------------- 1 | 4 | 5 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/_layouts/doc_default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {% include head.html %} 4 | 5 | {% include nav.html alwayson=true %} 6 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/_includes/nav_search.html: -------------------------------------------------------------------------------- 1 | 4 | 5 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/blog/all.html: -------------------------------------------------------------------------------- 1 | --- 2 | id: all 3 | layout: blog 4 | category: blog 5 | --- 6 | 7 |
8 |
9 |

All Posts

10 | {% for post in site.posts %} 11 | {% assign author = site.data.authors[post.author] %} 12 |

13 | 14 | {{ post.title }} 15 | 16 | on {{ post.date | date: "%B %e, %Y" }} by {{ author.display_name }} 17 |

18 | {% endfor %} 19 |
20 |
21 | -------------------------------------------------------------------------------- /demos/demo3_modules/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | cmake_minimum_required(VERSION 2.8) 3 | 4 | set(PROJ_NAME demo3_modules) 5 | file(GLOB SRCLIST ./src/*.*) 6 | 7 | add_executable(${PROJ_NAME} ${SRCLIST}) 8 | 9 | include_directories( 10 | ./src/ 11 | ${BASE_DIR}/src 12 | ${LAUNCHER_DIR}/src 13 | ${THIRDLIB_DIR}/cppformat-master 14 | ) 15 | 16 | target_link_libraries(${PROJ_NAME} 17 | base 18 | launcher 19 | cppformat 20 | ut 21 | ${ws2_32} 22 | ${dl} 23 | ${pthread} 24 | ) 25 | 26 | set_target_properties(${PROJ_NAME} PROPERTIES FOLDER "basic.demo") -------------------------------------------------------------------------------- /module/modules/src/NetPeer.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | #ifndef _US_NETCONNECT_ 9 | #define _US_NETCONNECT_ 10 | 11 | #include 12 | 13 | #include "NetAddress.h" 14 | #include "ut_sock.h" 15 | 16 | namespace ff 17 | { 18 | class NetPeer 19 | { 20 | public: 21 | NetPeer(); 22 | NetPeer(std::string name); 23 | 24 | std::string mName; 25 | int32_t mIdx; 26 | ut_sock_t mSock; 27 | NetAddress mAddress; 28 | }; 29 | } 30 | 31 | #endif -------------------------------------------------------------------------------- /thirdlib/iniparser-master/example/parse.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | #include "iniparser.h" 7 | 8 | int main(int argc, char * argv[]) 9 | { 10 | dictionary * ini ; 11 | char * ini_name ; 12 | 13 | if (argc<2) { 14 | ini_name = "twisted.ini"; 15 | } else { 16 | ini_name = argv[1] ; 17 | } 18 | 19 | ini = iniparser_load(ini_name); 20 | iniparser_dump(ini, stdout); 21 | iniparser_freedict(ini); 22 | 23 | return 0 ; 24 | } 25 | -------------------------------------------------------------------------------- /thirdlib/ut/lib/ut_net_listener.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** simple net lib for windows and linux 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in ut_def.h 5 | */ 6 | 7 | 8 | #ifndef _UT_NET_LISTENER_ 9 | #define _UT_NET_LISTENER_ 10 | 11 | #include "ut_def.h" 12 | #include "ut_sock.h" 13 | 14 | __C_BEGIN_DECLS 15 | 16 | 17 | ut_sock_t ut_net_open_listener(const char* ip, int32_t port); 18 | void ut_net_close_listener(ut_sock_t listener); 19 | ut_sock_t ut_net_accept_newsock(ut_sock_t listener); 20 | 21 | __C_END_DECLS 22 | 23 | #endif 24 | 25 | -------------------------------------------------------------------------------- /thirdlib/ut/lib/ut_sprintf.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** simple net lib for windows and linux 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in ut_def.h 5 | */ 6 | 7 | 8 | #ifndef _UT_SPRINTF_ 9 | #define _UT_SPRINTF_ 10 | 11 | #include "ut_def.h" 12 | 13 | __C_BEGIN_DECLS 14 | 15 | #include 16 | #include 17 | 18 | int32_t ut_snprintf(char* dstbuf, int32_t bufsize, const char* fmt, ...); 19 | int32_t ut_svnprintf(char* dstbuf, int32_t bufsize, const char* fmt, va_list argptr); 20 | 21 | __C_END_DECLS 22 | 23 | #endif 24 | 25 | -------------------------------------------------------------------------------- /demos/demo1_module/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | cmake_minimum_required(VERSION 2.8) 3 | 4 | set(PROJ_NAME demo1_module) 5 | file(GLOB SRCLIST ./src/*.*) 6 | 7 | add_executable(${PROJ_NAME} ${SRCLIST}) 8 | 9 | include_directories( 10 | ./src/ 11 | ${BASE_DIR}/src 12 | ${LAUNCHER_DIR}/src 13 | ${THIRDLIB_DIR}/cppformat-master 14 | ) 15 | 16 | target_link_libraries(${PROJ_NAME} 17 | base 18 | launcher 19 | cppformat 20 | ut 21 | ${ws2_32} 22 | ${dl} 23 | ${pthread} 24 | ) 25 | 26 | set_target_properties(${PROJ_NAME} PROPERTIES FOLDER "basic.demo") 27 | -------------------------------------------------------------------------------- /demos/demo3_modules/src/ModuleTest3.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | 9 | #ifndef _US_MODULE_TEST3_ 10 | #define _US_MODULE_TEST3_ 11 | 12 | #include "IModule.h" 13 | 14 | namespace ff 15 | { 16 | namespace demo 17 | { 18 | class ModuleTest3 : public ff::IModule 19 | { 20 | public: 21 | virtual bool initialize(ModuleMgr& mgr); 22 | virtual void finalize(); 23 | 24 | public: 25 | void hello(); 26 | 27 | }; 28 | } 29 | } 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /thirdlib/cppformat-master/support/biicode-build.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Build the project with Biicode. 3 | 4 | import glob, os, shutil 5 | from subprocess import check_call 6 | 7 | project_dir = 'biicode_project' 8 | check_call(['bii', 'init', project_dir]) 9 | cppformat_dir = os.path.join(project_dir, 'blocks/vitaut/cppformat') 10 | shutil.copytree('.', cppformat_dir, ignore=shutil.ignore_patterns(project_dir)) 11 | for f in glob.glob('support/biicode/*'): 12 | shutil.copy(f, cppformat_dir) 13 | check_call(['bii', 'cpp:build'], cwd=project_dir) 14 | -------------------------------------------------------------------------------- /base/src/Config.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | 9 | #include "Config.h" 10 | 11 | using namespace ff; 12 | 13 | void Config::set(const std::string& key, const std::string& val) 14 | { 15 | mValues[key] = val; 16 | } 17 | 18 | std::string Config::get(const std::string& key) 19 | { 20 | std::map::iterator iter = mValues.find(key); 21 | if (iter == mValues.end()) 22 | { 23 | return ""; 24 | } 25 | 26 | return iter->second; 27 | } 28 | -------------------------------------------------------------------------------- /module/modulelua/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | cmake_minimum_required(VERSION 2.8) 3 | 4 | set(PROJ_NAME modulelua) 5 | file(GLOB SRCLIST ./src/*.*) 6 | 7 | add_library(${PROJ_NAME} ${SRCLIST}) 8 | 9 | include_directories( 10 | ${ACTOR_DIR}/src 11 | ${BASE_DIR}/src 12 | ${MODULE_DIR}/common 13 | ${MODULE_DIR}/modulenetservice/src 14 | ${THIRDLIB_DIR}/ut/lib 15 | ${THIRDLIB_DIR}/cppformat-master 16 | ${THIRDLIB_DIR}/spdlog-master/include/spdlog 17 | ${THIRDLIB_DIR}/lua-5.3.3/src 18 | ) 19 | 20 | set_target_properties(${PROJ_NAME} PROPERTIES FOLDER "modules") 21 | -------------------------------------------------------------------------------- /module/modulenetservice/src/NetPeer.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | #ifndef _US_NETCONNECT_ 9 | #define _US_NETCONNECT_ 10 | 11 | #include 12 | 13 | #include "NetAddress.h" 14 | #include "ut_sock.h" 15 | 16 | namespace ff 17 | { 18 | class NetPeer 19 | { 20 | public: 21 | NetPeer(); 22 | NetPeer(std::string name); 23 | 24 | std::string mName; 25 | int32_t mIdx; 26 | ut_sock_t mSock; 27 | NetAddress mAddress; 28 | }; 29 | } 30 | 31 | #endif -------------------------------------------------------------------------------- /thirdlib/cppformat-master/.travis.yml: -------------------------------------------------------------------------------- 1 | language: cpp 2 | 3 | os: 4 | - linux 5 | - osx 6 | 7 | env: 8 | global: 9 | - secure: |- 10 | Gsnp9ERFnXt+diCfc7Vb72g+7HDn1MCHvw4zfUDdoBh9bxxFlLQRlzZZfwWhzni57lflrt 11 | 0QHXafu+oBVOJuNv6WauV3+ZyuWIQRmNGjZFNLvZsXHK/dyad2vGQBPvEkb+8l/aCyTpbr 12 | 6pxmyzLHSn1ZR7OX5rfPvwM3tOyZ3H0= 13 | matrix: 14 | - BUILD=Doc 15 | - BUILD=Debug 16 | - BUILD=Release 17 | 18 | matrix: 19 | exclude: 20 | - os: osx 21 | env: BUILD=Doc 22 | 23 | script: 24 | - support/travis-build.py 25 | -------------------------------------------------------------------------------- /thirdlib/iniparser-master/example/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # iniparser tests Makefile 3 | # 4 | 5 | CC = gcc 6 | CFLAGS = -g -I../src 7 | LFLAGS = -L.. -liniparser 8 | AR = ar 9 | ARFLAGS = rcv 10 | RM = rm -f 11 | 12 | 13 | default: all 14 | 15 | all: iniexample parse 16 | 17 | iniexample: iniexample.c 18 | $(CC) $(CFLAGS) -o iniexample iniexample.c -I../src -L.. -liniparser 19 | 20 | parse: parse.c 21 | $(CC) $(CFLAGS) -o parse parse.c -I../src -L.. -liniparser 22 | 23 | clean veryclean: 24 | $(RM) iniexample example.ini parse 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /demos/demo2_modulecomponent/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | cmake_minimum_required(VERSION 2.8) 3 | 4 | set(PROJ_NAME demo2_modulecomponent) 5 | file(GLOB SRCLIST ./src/*.*) 6 | 7 | add_executable(${PROJ_NAME} ${SRCLIST}) 8 | 9 | include_directories( 10 | ./src/ 11 | ${BASE_DIR}/src 12 | ${LAUNCHER_DIR}/src 13 | ${THIRDLIB_DIR}/cppformat-master 14 | ) 15 | 16 | target_link_libraries(${PROJ_NAME} 17 | base 18 | launcher 19 | cppformat 20 | ut 21 | ${ws2_32} 22 | ${dl} 23 | ${pthread} 24 | ) 25 | 26 | set_target_properties(${PROJ_NAME} PROPERTIES FOLDER "basic.demo") 27 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/utilities/redis/redis_list_exception.h: -------------------------------------------------------------------------------- 1 | /** 2 | * A simple structure for exceptions in RedisLists. 3 | * 4 | * @author Deon Nicholas (dnicholas@fb.com) 5 | * Copyright 2013 Facebook 6 | */ 7 | 8 | #ifndef ROCKSDB_LITE 9 | #pragma once 10 | #include 11 | 12 | namespace rocksdb { 13 | 14 | class RedisListException: public std::exception { 15 | public: 16 | const char* what() const throw() override { 17 | return "Invalid operation or corrupt data in Redis List."; 18 | } 19 | }; 20 | 21 | } // namespace rocksdb 22 | #endif 23 | -------------------------------------------------------------------------------- /base/src/Config.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | #ifndef _FF_CONFIG_ 9 | #define _FF_CONFIG_ 10 | 11 | #include 12 | #include 13 | 14 | #include "Singleton.h" 15 | 16 | 17 | namespace ff 18 | { 19 | class Config : public Singleton 20 | { 21 | public: 22 | void set(const std::string& key, const std::string& val); 23 | std::string get(const std::string& key); 24 | 25 | private: 26 | std::map mValues; 27 | }; 28 | } 29 | #endif -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/java/crossbuild/build-linux.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # install all required packages for rocksdb 3 | sudo apt-get update 4 | sudo apt-get -y install git make gcc g++ libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev default-jdk 5 | 6 | # set java home so we can build rocksdb jars 7 | export JAVA_HOME=$(echo /usr/lib/jvm/java-7-openjdk*) 8 | cd /rocksdb 9 | make jclean clean 10 | make -j 4 rocksdbjavastatic 11 | cp /rocksdb/java/target/librocksdbjni-* /rocksdb-build 12 | cp /rocksdb/java/target/rocksdbjni-* /rocksdb-build 13 | sudo shutdown -h now 14 | 15 | -------------------------------------------------------------------------------- /base/src/IModule.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | #ifndef _FF_MODULE_ 9 | #define _FF_MODULE_ 10 | 11 | #include "ModuleMgr.h" 12 | 13 | namespace ff 14 | { 15 | /* 16 | 所有模块的基类 17 | */ 18 | class IModule 19 | { 20 | public: 21 | virtual ~IModule() {} 22 | /*模块自身的初始化函数,此函数内不要调用其它模块的成员函数*/ 23 | virtual bool initialize(ModuleMgr& mgr) = 0; 24 | /*系统即将关闭时调用*/ 25 | virtual void finalize() = 0; 26 | /*系统主循环开始前调用*/ 27 | virtual void preStartLoop() {}; 28 | }; 29 | } 30 | #endif -------------------------------------------------------------------------------- /base/src/Reloadable.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | #ifndef _FF_RELOADABLE_ 9 | #define _FF_RELOADABLE_ 10 | 11 | #include 12 | #include 13 | 14 | 15 | namespace ff 16 | { 17 | class Reloadable 18 | { 19 | public: 20 | Reloadable(std::string fname); 21 | bool tryReload(); 22 | 23 | virtual bool doReload() = 0; 24 | virtual void confirmReload() = 0; 25 | 26 | protected: 27 | std::string mFileName; 28 | int64_t mWriteTime; 29 | }; 30 | } 31 | 32 | #endif -------------------------------------------------------------------------------- /base/src/ILog.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | #ifndef _FF_ILOG_ 9 | #define _FF_ILOG_ 10 | 11 | #include 12 | 13 | 14 | namespace ff 15 | { 16 | /* 17 | 日志接口 18 | */ 19 | class Log 20 | { 21 | public: 22 | virtual ~Log() {} 23 | enum class LogLevel 24 | { 25 | L_TRACE, 26 | L_DEBUG, 27 | L_NOTICE, 28 | L_WARNING, 29 | L_ERROR, 30 | L_FATAL, 31 | }; 32 | 33 | virtual bool doLog(LogLevel level, const std::string& msg) = 0; 34 | }; 35 | } 36 | 37 | #endif -------------------------------------------------------------------------------- /thirdlib/cppformat-master/support/biicode/biicode.conf: -------------------------------------------------------------------------------- 1 | # Biicode configuration file 2 | 3 | [paths] 4 | # Local directories to look for headers (within block) 5 | / 6 | 7 | [dependencies] 8 | # Manual adjust file implicit dependencies, add (+), remove (-), or overwrite (=) 9 | CMakeLists.txt + cmake/FindSetEnv.cmake 10 | format.h = format.cc 11 | format.cc - test/* posix.cc 12 | support/biicode/sample.cc - test/* 13 | 14 | [mains] 15 | # Manual adjust of files that define an executable 16 | !test/test-main.cc 17 | 18 | [parent] 19 | vitaut/cppformat: 0 -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/include/rocksdb/sst_dump_tool.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011-present, Facebook, Inc. All rights reserved. 2 | // This source code is licensed under the BSD-style license found in the 3 | // LICENSE file in the root directory of this source tree. An additional grant 4 | // of patent rights can be found in the PATENTS file in the same directory. 5 | #ifndef ROCKSDB_LITE 6 | #pragma once 7 | 8 | namespace rocksdb { 9 | 10 | class SSTDumpTool { 11 | public: 12 | int Run(int argc, char** argv); 13 | }; 14 | 15 | } // namespace rocksdb 16 | 17 | #endif // ROCKSDB_LITE 18 | -------------------------------------------------------------------------------- /thirdlib/cppformat-master/doc/bootstrap/mixins/pagination.less: -------------------------------------------------------------------------------- 1 | // Pagination 2 | 3 | .pagination-size(@padding-vertical; @padding-horizontal; @font-size; @border-radius) { 4 | > li { 5 | > a, 6 | > span { 7 | padding: @padding-vertical @padding-horizontal; 8 | font-size: @font-size; 9 | } 10 | &:first-child { 11 | > a, 12 | > span { 13 | .border-left-radius(@border-radius); 14 | } 15 | } 16 | &:last-child { 17 | > a, 18 | > span { 19 | .border-right-radius(@border-radius); 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /demos/demo3_modules/src/ModuleTest3.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | 9 | #include "ModuleTest3.h" 10 | #include "base.h" 11 | 12 | 13 | using namespace ff::demo; 14 | using namespace ff; 15 | 16 | bool ModuleTest3::initialize(ModuleMgr& mgr) 17 | { 18 | SYSLOG_DEBUG("ModuleTest initialize."); 19 | return true; 20 | } 21 | 22 | void ModuleTest3::finalize() 23 | { 24 | SYSLOG_DEBUG("ModuleTest finalize."); 25 | } 26 | 27 | void ModuleTest3::hello() 28 | { 29 | SYSLOG_DEBUG("ModuleTest3 hello."); 30 | } -------------------------------------------------------------------------------- /thirdlib/cppformat-master/doc/bootstrap/mixins/border-radius.less: -------------------------------------------------------------------------------- 1 | // Single side border-radius 2 | 3 | .border-top-radius(@radius) { 4 | border-top-right-radius: @radius; 5 | border-top-left-radius: @radius; 6 | } 7 | .border-right-radius(@radius) { 8 | border-bottom-right-radius: @radius; 9 | border-top-right-radius: @radius; 10 | } 11 | .border-bottom-radius(@radius) { 12 | border-bottom-right-radius: @radius; 13 | border-bottom-left-radius: @radius; 14 | } 15 | .border-left-radius(@radius) { 16 | border-bottom-left-radius: @radius; 17 | border-top-left-radius: @radius; 18 | } 19 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/_posts/2015-06-12-rocksdb-in-osquery.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: RocksDB in osquery 3 | layout: post 4 | author: icanadi 5 | category: lgalanis 6 | redirect_from: 7 | - /blog/1997/rocksdb-in-osquery/ 8 | --- 9 | 10 | Check out [this](https://code.facebook.com/posts/1411870269134471/how-rocksdb-is-used-in-osquery/) blog post by [Mike Arpaia](https://www.facebook.com/mike.arpaia) and [Ted Reed](https://www.facebook.com/treeded) about how osquery leverages RocksDB to build an embedded pub-sub system. This article is a great read and contains insights on how to properly use RocksDB. 11 | -------------------------------------------------------------------------------- /thirdlib/spdlog-master/bench/spdlog-bench.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "spdlog/spdlog.h" 3 | 4 | 5 | int main(int, char* []) 6 | { 7 | int howmany = 1000000; 8 | namespace spd = spdlog; 9 | ///Create a file rotating logger with 5mb size max and 3 rotated files 10 | auto logger = spdlog::create("file_logger", "logs/spd-bench-st.txt", false); 11 | 12 | logger->set_pattern("[%Y-%b-%d %T.%e]: %v"); 13 | for(int i = 0 ; i < howmany; ++i) 14 | logger->info() << "spdlog message #" << i << ": This is some text for your pleasure"; 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: 1.0.{build} 2 | image: Visual Studio 2015 3 | before_build: 4 | - md %APPVEYOR_BUILD_FOLDER%\build 5 | - cd %APPVEYOR_BUILD_FOLDER%\build 6 | - cmake -G "Visual Studio 14 2015 Win64" -DOPTDBG=1 -DXPRESS=1 .. 7 | - cd .. 8 | build: 9 | project: build\rocksdb.sln 10 | parallel: true 11 | verbosity: minimal 12 | test: 13 | test_script: 14 | - ps: build_tools\run_ci_db_test.ps1 -Run db_test2 -Concurrency 8 15 | - ps: build_tools\run_ci_db_test.ps1 -Run db_test -Concurrency 8 16 | - ps: build_tools\run_ci_db_test.ps1 -Run env_test,env_basic_test -Concurrency 2 17 | 18 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/db/db_info_dumper.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011-present, Facebook, Inc. All rights reserved. 2 | // This source code is licensed under the BSD-style license found in the 3 | // LICENSE file in the root directory of this source tree. An additional grant 4 | // of patent rights can be found in the PATENTS file in the same directory. 5 | #pragma once 6 | 7 | #include 8 | 9 | #include "util/db_options.h" 10 | 11 | namespace rocksdb { 12 | void DumpDBFileSummary(const ImmutableDBOptions& options, 13 | const std::string& dbname); 14 | } // namespace rocksdb 15 | -------------------------------------------------------------------------------- /thirdlib/ut/lib/ut_file.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** simple net lib for windows and linux 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in ut_def.h 5 | */ 6 | 7 | #include 8 | #include 9 | #include "ut_file.h" 10 | 11 | int64_t ut_file_modifytime(const char* fname) 12 | { 13 | FILE* fp = 0; 14 | int fd = 0; 15 | struct stat fileStat; 16 | if (fname == 0) { 17 | return 0; 18 | } 19 | 20 | fp = fopen(fname, "r"); 21 | if (fp == 0) { 22 | return 0; 23 | } 24 | 25 | fd = fileno(fp); 26 | fstat(fd, &fileStat); 27 | 28 | fclose(fp); 29 | 30 | return fileStat.st_mtime; 31 | } 32 | -------------------------------------------------------------------------------- /demos/demo6_actor/src/ModuleTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | 9 | #ifndef _US_MODULE_TEST_ 10 | #define _US_MODULE_TEST_ 11 | 12 | #include "IModule.h" 13 | #include "ActorWork.h" 14 | 15 | namespace ff 16 | { 17 | namespace demo 18 | { 19 | class ModuleTest : public ff::IModule 20 | { 21 | public: 22 | virtual bool initialize(ModuleMgr& mgr); 23 | virtual void finalize(); 24 | 25 | private: 26 | void hardwork(); 27 | void workfinish(ActorWork* work); 28 | }; 29 | } 30 | } 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /thirdlib/spdlog-master/tests/install_libcxx.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Install libc++ under travis 4 | 5 | svn --quiet co http://llvm.org/svn/llvm-project/libcxx/trunk libcxx 6 | mkdir libcxx/build 7 | (cd libcxx/build && cmake .. -DLIBCXX_CXX_ABI=libstdc++ -DLIBCXX_CXX_ABI_INCLUDE_PATHS="/usr/include/c++/4.6;/usr/include/c++/4.6/x86_64-linux-gnu") 8 | make -C libcxx/build cxx -j2 9 | sudo cp libcxx/build/lib/libc++.so.1.0 /usr/lib/ 10 | sudo cp -r libcxx/build/include/c++/v1 /usr/include/c++/v1/ 11 | sudo ln -sf /usr/lib/libc++.so.1.0 /usr/lib/libc++.so 12 | sudo ln -sf /usr/lib/libc++.so.1.0 /usr/lib/libc++.so.1 13 | -------------------------------------------------------------------------------- /thirdlib/ut/lib/ut_packdata.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** simple net lib for windows and linux 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in ut_def.h 5 | */ 6 | 7 | 8 | 9 | #ifndef _UT_PACKDATA_H_ 10 | #define _UT_PACKDATA_H_ 11 | 12 | #include "ut_def.h" 13 | 14 | __C_BEGIN_DECLS 15 | 16 | int32_t ut_pack_int(int32_t val, char* data, int32_t dl); 17 | int32_t ut_unpack_int(int32_t* val, char* data, int32_t dl); 18 | 19 | int32_t ut_pack_data(const char* sz, int32_t szl, char* data, int32_t dl); 20 | int32_t ut_unpack_data(char* sz, int32_t* szl, char* data, int32_t dl); 21 | 22 | __C_END_DECLS 23 | 24 | #endif -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/java/src/test/java/org/rocksdb/RocksMemoryResource.java: -------------------------------------------------------------------------------- 1 | package org.rocksdb; 2 | 3 | import org.junit.rules.ExternalResource; 4 | 5 | /** 6 | * Resource to trigger garbage collection after each test 7 | * run. 8 | * 9 | * @deprecated Will be removed with the implementation of 10 | * {@link RocksObject#finalize()} 11 | */ 12 | @Deprecated 13 | public class RocksMemoryResource extends ExternalResource { 14 | 15 | static { 16 | RocksDB.loadLibrary(); 17 | } 18 | 19 | @Override 20 | protected void after() { 21 | System.gc(); 22 | System.runFinalization(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /demos/demo3_modules/src/ModuleTest2.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | 9 | #ifndef _US_MODULE_TEST2_ 10 | #define _US_MODULE_TEST2_ 11 | 12 | #include "IModule.h" 13 | #include "ModuleTest3.h" 14 | 15 | namespace ff 16 | { 17 | namespace demo 18 | { 19 | class ModuleTest2 : public ff::IModule 20 | { 21 | public: 22 | virtual bool initialize(ModuleMgr& mgr); 23 | virtual void finalize(); 24 | 25 | public: 26 | void hello(); 27 | 28 | private: 29 | ModuleTest3* mModuleTest3; 30 | }; 31 | } 32 | } 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /module/moduleactor/src/ActorWork.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | #ifndef _US_ACTOR_WORK_ 9 | #define _US_ACTOR_WORK_ 10 | 11 | #include 12 | #include 13 | 14 | namespace ff 15 | { 16 | class ActorWork 17 | { 18 | public: 19 | virtual ~ActorWork(){}; 20 | void setCallback(std::function callback, int32_t timeout); 21 | void doCallback(); 22 | 23 | private: 24 | int32_t mTimeout; 25 | int32_t mTimeLeft; 26 | std::function mCallback; 27 | }; 28 | } 29 | #endif -------------------------------------------------------------------------------- /thirdlib/cppformat-master/support/biicode/sample.cc: -------------------------------------------------------------------------------- 1 | #include "vitaut/cppformat/format.h" 2 | 3 | class Date { 4 | int year_, month_, day_; 5 | public: 6 | Date(int year, int month, int day) : year_(year), month_(month), day_(day) {} 7 | 8 | friend std::ostream &operator<<(std::ostream &os, const Date &d) { 9 | return os << d.year_ << '-' << d.month_ << '-' << d.day_; 10 | } 11 | }; 12 | 13 | int main() { 14 | std::string s = fmt::format("The date is {}", Date(2012, 12, 9)); 15 | fmt::print("Hello, {}!", "world"); // uses Python-like format string syntax 16 | fmt::printf("\n%s", s); // uses printf format string syntax 17 | } 18 | -------------------------------------------------------------------------------- /thirdlib/cppformat-master/support/rtd/theme/layout.html: -------------------------------------------------------------------------------- 1 | {% extends "basic/layout.html" %} 2 | 3 | {% block extrahead %} 4 | 5 | 6 | 9 | Page Redirection 10 | {% endblock %} 11 | 12 | {% block document %} 13 | If you are not redirected automatically, follow the link to the C++ Format documentation. 14 | {% endblock %} 15 | 16 | {% block footer %} 17 | {% endblock %} 18 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/util/perf_level_imp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011-present, Facebook, Inc. All rights reserved. 2 | // This source code is licensed under the BSD-style license found in the 3 | // LICENSE file in the root directory of this source tree. An additional grant 4 | // of patent rights can be found in the PATENTS file in the same directory. 5 | // 6 | #pragma once 7 | #include "rocksdb/perf_level.h" 8 | #include "port/port.h" 9 | 10 | namespace rocksdb { 11 | 12 | #if defined(IOS_CROSS_COMPILE) 13 | extern PerfLevel perf_level; 14 | #else 15 | extern __thread PerfLevel perf_level; 16 | #endif 17 | 18 | } // namespace rocksdb 19 | -------------------------------------------------------------------------------- /base/src/IComponentMgr.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | #ifndef _FF_MODULE_COMPONENT_MGR_ 9 | #define _FF_MODULE_COMPONENT_MGR_ 10 | 11 | #include 12 | #include 13 | #include "IModule.h" 14 | namespace ff 15 | { 16 | /* 17 | 模块组件管理器 18 | */ 19 | class IComponentMgr 20 | { 21 | public: 22 | /*主线程每贞会调用tick*/ 23 | virtual void tick(int32_t delta) = 0; 24 | virtual bool registerModule(std::string name, IModule* module) = 0; 25 | virtual bool initialize() = 0; 26 | virtual void finalize() = 0; 27 | }; 28 | } 29 | 30 | #endif -------------------------------------------------------------------------------- /cardgame/server/hotswaplogic/src/ModuleMsgTrigger.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | #include 8 | 9 | #include "ModuleMgr.h" 10 | #include "ModuleMsgTrigger.h" 11 | #include "base.h" 12 | 13 | using namespace ff; 14 | 15 | bool ModuleMsgTrigger::initialize(ff::ModuleMgr& mgr) 16 | { 17 | return true; 18 | } 19 | 20 | void ModuleMsgTrigger::finalize() 21 | { 22 | 23 | } 24 | 25 | int32_t ModuleMsgTrigger::triggerNetMsg(Player& player, int32_t msgid, const char* msg, int32_t len) 26 | { 27 | return mMsgMgr.triggerMsg(player, msgid, msg, len); 28 | } -------------------------------------------------------------------------------- /demos/demo4_lua/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | cmake_minimum_required(VERSION 2.8) 3 | 4 | set(PROJ_NAME demo4_lua) 5 | file(GLOB SRCLIST ./src/*.*) 6 | 7 | link_directories(${THIRDLIB_DIR}/LuaJIT-2.0.4/src) 8 | 9 | add_executable(${PROJ_NAME} ${SRCLIST}) 10 | 11 | include_directories( 12 | ./src/ 13 | ${BASE_DIR}/src 14 | ${LAUNCHER_DIR}/src 15 | ${THIRDLIB_DIR}/cppformat-master 16 | ${MODULE_DIR}/modulelua/src 17 | ${THIRDLIB_DIR}/lua-5.3.3/src 18 | ) 19 | 20 | target_link_libraries(${PROJ_NAME} 21 | base 22 | launcher 23 | cppformat 24 | modulelua 25 | lua 26 | ) 27 | 28 | set_target_properties(${PROJ_NAME} PROPERTIES FOLDER "advanced.demo") -------------------------------------------------------------------------------- /cardgame/server/hotswaplogic/src/ModuleTalk.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | 9 | #ifndef _FF_MODULE_TALK_ 10 | #define _FF_MODULE_TALK_ 11 | 12 | #include 13 | #include 14 | #include "Player.h" 15 | #include "MsgMgr.h" 16 | #include "IModule.h" 17 | #include "csmsg.h" 18 | 19 | namespace ff 20 | { 21 | class ModuleTalk : public IModule 22 | { 23 | public: 24 | virtual bool initialize(ModuleMgr& mgr); 25 | virtual void finalize(); 26 | 27 | public: 28 | int netMsg(Player& player, const cs_talk& msg); 29 | }; 30 | } 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /module/modules/src/NetAddress.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | 9 | #ifndef _US_NET_ADDRESS_ 10 | #define _US_NET_ADDRESS_ 11 | 12 | #include 13 | #include 14 | 15 | 16 | namespace ff 17 | { 18 | class NetAddress 19 | { 20 | public: 21 | NetAddress(); 22 | NetAddress(std::string ip, int32_t port); 23 | 24 | public: 25 | std::string ip(); 26 | int32_t port(); 27 | 28 | void setIp(const std::string& ip); 29 | void setPort(int32_t port); 30 | 31 | private: 32 | std::string mip; 33 | int32_t mport; 34 | }; 35 | } 36 | #endif -------------------------------------------------------------------------------- /base/src/ReloadMgr.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | #ifndef _FF_RELOADMGR_ 9 | #define _FF_RELOADMGR_ 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | #include "Reloadable.h" 16 | #include "Singleton.h" 17 | 18 | 19 | namespace ff 20 | { 21 | class ReloadMgr : public Singleton 22 | { 23 | public: 24 | bool addReloadable(std::shared_ptr item); 25 | void makeReload(); 26 | void confirmReload(); 27 | 28 | private: 29 | std::vector> mReloadables; 30 | }; 31 | } 32 | 33 | #endif -------------------------------------------------------------------------------- /demos/demo6_actor/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | cmake_minimum_required(VERSION 2.8) 3 | 4 | set(PROJ_NAME demo6_actor) 5 | 6 | file(GLOB SRCLIST ./src/*.*) 7 | 8 | add_executable(${PROJ_NAME} ${SRCLIST}) 9 | 10 | include_directories( 11 | ./src/ 12 | ${BASE_DIR}/src 13 | ${LAUNCHER_DIR}/src 14 | ${THIRDLIB_DIR}/cppformat-master 15 | ${MODULE_DIR}/moduleactor/src 16 | ) 17 | 18 | IF(UNIX) 19 | set(dl dl) 20 | set(pthread pthread) 21 | ENDIF(UNIX) 22 | 23 | target_link_libraries(${PROJ_NAME} 24 | base 25 | launcher 26 | cppformat 27 | moduleactor 28 | ${dl} 29 | ${pthread} 30 | ) 31 | 32 | set_target_properties(${PROJ_NAME} PROPERTIES FOLDER "advanced.demo") -------------------------------------------------------------------------------- /module/modulenetservice/src/NetAddress.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | 9 | #ifndef _US_NET_ADDRESS_ 10 | #define _US_NET_ADDRESS_ 11 | 12 | #include 13 | #include 14 | 15 | 16 | namespace ff 17 | { 18 | class NetAddress 19 | { 20 | public: 21 | NetAddress(); 22 | NetAddress(std::string ip, int32_t port); 23 | 24 | public: 25 | std::string ip(); 26 | int32_t port(); 27 | 28 | void setIp(const std::string& ip); 29 | void setPort(int32_t port); 30 | 31 | private: 32 | std::string mip; 33 | int32_t mport; 34 | }; 35 | } 36 | #endif -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/.arcconfig: -------------------------------------------------------------------------------- 1 | { 2 | "project_id" : "rocksdb", 3 | "conduit_uri" : "https://phabricator.fb.com/api/", 4 | "copyright_holder" : "Facebook", 5 | "load" : [ 6 | "arcanist_util" 7 | ], 8 | "lint.engine" : "FacebookFbcodeLintEngine", 9 | "lint.engine.single.linter" : "FbcodeCppLinter", 10 | "unit.engine" : "FacebookFbcodeUnitTestEngine", 11 | "arcanist_configuration" : "FacebookArcanistConfiguration", 12 | "base" : "git:HEAD^, hg:.^", 13 | "git.default-relative-commit" : "HEAD^", 14 | "git:arc.feature.start.default" : "origin/master", 15 | "arc.feature.start.default" : "master", 16 | "history.immutable" : false 17 | } 18 | -------------------------------------------------------------------------------- /thirdlib/lua-5.3.3/src/lapi.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lapi.h,v 2.9 2015/03/06 19:49:50 roberto Exp $ 3 | ** Auxiliary functions from Lua API 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lapi_h 8 | #define lapi_h 9 | 10 | 11 | #include "llimits.h" 12 | #include "lstate.h" 13 | 14 | #define api_incr_top(L) {L->top++; api_check(L, L->top <= L->ci->top, \ 15 | "stack overflow");} 16 | 17 | #define adjustresults(L,nres) \ 18 | { if ((nres) == LUA_MULTRET && L->ci->top < L->top) L->ci->top = L->top; } 19 | 20 | #define api_checknelems(L,n) api_check(L, (n) < (L->top - L->ci->func), \ 21 | "not enough elements in the stack") 22 | 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/tools/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(TOOLS 2 | sst_dump.cc 3 | db_sanity_test.cc 4 | db_stress.cc 5 | write_stress.cc 6 | ldb.cc 7 | db_repl_stress.cc 8 | dump/rocksdb_dump.cc 9 | dump/rocksdb_undump.cc) 10 | foreach(src ${TOOLS}) 11 | get_filename_component(exename ${src} NAME_WE) 12 | add_executable(${exename}${ARTIFACT_SUFFIX} 13 | ${src}) 14 | target_link_libraries(${exename}${ARTIFACT_SUFFIX} ${LIBS}) 15 | list(APPEND tool_deps ${exename}) 16 | endforeach() 17 | add_custom_target(tools 18 | DEPENDS ${tool_deps}) 19 | add_custom_target(ldb_tests 20 | COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/ldb_tests.py 21 | DEPENDS ldb) 22 | -------------------------------------------------------------------------------- /module/modules/src/ModuleRocksDb.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | #ifndef _US_MODULE_ROCKSDB_ 9 | #define _US_MODULE_ROCKSDB_ 10 | 11 | 12 | #include 13 | #include 14 | 15 | #include "IModule.h" 16 | #include "rocksdb/db.h" 17 | 18 | namespace ff 19 | { 20 | class ModuleRocksDb : public IModule 21 | { 22 | public: 23 | virtual bool initialize(ff::ModuleMgr& mgr); 24 | virtual void finalize(); 25 | 26 | std::string load(std::string key); 27 | void save(std::string key, std::string val); 28 | 29 | private: 30 | rocksdb::DB* mDb; 31 | }; 32 | } 33 | #endif -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/java/src/main/java/org/rocksdb/MergeOperator.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Vlad Balan (vlad.gm@gmail.com). All rights reserved. 2 | // This source code is licensed under the BSD-style license found in the 3 | // LICENSE file in the root directory of this source tree. An additional grant 4 | // of patent rights can be found in the PATENTS file in the same directory. 5 | 6 | package org.rocksdb; 7 | 8 | /** 9 | * MergeOperator holds an operator to be applied when compacting 10 | * two merge operands held under the same key in order to obtain a single 11 | * value. 12 | */ 13 | public interface MergeOperator { 14 | long newMergeOperatorHandle(); 15 | } 16 | -------------------------------------------------------------------------------- /base/src/SpinlockGuard.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | 9 | #ifndef _FF_SPINLOCK_GUARD 10 | #define _FF_SPINLOCK_GUARD 11 | 12 | 13 | #include "Spinlock.h" 14 | 15 | namespace ff 16 | { 17 | class SpinlockGuard 18 | { 19 | private: 20 | SpinlockGuard(const SpinlockGuard&) = delete; 21 | void operator=(const SpinlockGuard&) = delete; 22 | 23 | public: 24 | SpinlockGuard(Spinlock& lock) :mLock(lock) 25 | { 26 | mLock.lock(); 27 | } 28 | 29 | ~SpinlockGuard() 30 | { 31 | mLock.unlock(); 32 | } 33 | 34 | private: 35 | Spinlock& mLock; 36 | }; 37 | } 38 | 39 | #endif -------------------------------------------------------------------------------- /thirdlib/cppformat-master/doc/bootstrap/mixins/panels.less: -------------------------------------------------------------------------------- 1 | // Panels 2 | 3 | .panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border) { 4 | border-color: @border; 5 | 6 | & > .panel-heading { 7 | color: @heading-text-color; 8 | background-color: @heading-bg-color; 9 | border-color: @heading-border; 10 | 11 | + .panel-collapse > .panel-body { 12 | border-top-color: @border; 13 | } 14 | .badge { 15 | color: @heading-bg-color; 16 | background-color: @heading-text-color; 17 | } 18 | } 19 | & > .panel-footer { 20 | + .panel-collapse > .panel-body { 21 | border-bottom-color: @border; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /thirdlib/cppformat-master/support/cmake/biicode.cmake: -------------------------------------------------------------------------------- 1 | # Initializes block variables 2 | INIT_BIICODE_BLOCK() 3 | 4 | # Actually create targets: EXEcutables and libraries. 5 | ADD_BIICODE_TARGETS() 6 | 7 | target_include_directories(${BII_BLOCK_TARGET} INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) 8 | 9 | if (HAVE_OPEN) 10 | target_compile_definitions(${BII_BLOCK_TARGET} INTERFACE -DFMT_USE_FILE_DESCRIPTORS=1) 11 | endif () 12 | 13 | if (CMAKE_COMPILER_IS_GNUCXX) 14 | target_compile_options(${BII_BLOCK_TARGET} INTERFACE -Wall -Wextra -Wshadow -pedantic) 15 | endif () 16 | if (CPP11_FLAG AND FMT_PEDANTIC) 17 | target_compile_options(${BII_BLOCK_TARGET} INTERFACE ${CPP11_FLAG}) 18 | endif () 19 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/_top-level/support.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: top-level 3 | title: Support 4 | id: support 5 | category: support 6 | --- 7 | 8 | ## Need help? 9 | 10 | Do not hesitate to ask questions if you are having trouble with RocksDB. 11 | 12 | ### GitHub issues 13 | 14 | Use [GitHub issues](https://github.com/facebook/rocksdb/issues) to report bugs, issues and feature requests for the RocksDB codebase. 15 | 16 | ### Facebook Group 17 | 18 | Use the [RocksDB Facebook group](https://www.facebook.com/groups/rocksdb.dev/) for general questions and discussion about RocksDB. 19 | 20 | ### FAQ 21 | 22 | Check out a list of [commonly asked questions](/docs/support/faq) about RocksDB. 23 | -------------------------------------------------------------------------------- /thirdlib/ut/lib/ut_time.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** simple net lib for windows and linux 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in ut_def.h 5 | */ 6 | 7 | 8 | #include "ut_time.h" 9 | #include 10 | 11 | #ifdef UT_PLATFORM_LINUX 12 | #include 13 | 14 | int64_t ut_gettickcount() 15 | { 16 | struct timespec ts; 17 | clock_gettime(CLOCK_MONOTONIC, &ts); 18 | return (ts.tv_sec * 1000 + ts.tv_nsec / 1000000); 19 | } 20 | 21 | #endif 22 | 23 | #ifdef UT_PLATFORM_WINDOWS 24 | #include 25 | 26 | int64_t ut_gettickcount() 27 | { 28 | return GetTickCount(); 29 | } 30 | 31 | #endif 32 | 33 | int64_t ut_time_seconds() 34 | { 35 | return time(0); 36 | } 37 | -------------------------------------------------------------------------------- /thirdlib/cppformat-master/doc/bootstrap/wells.less: -------------------------------------------------------------------------------- 1 | // 2 | // Wells 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | .well { 8 | min-height: 20px; 9 | padding: 19px; 10 | margin-bottom: 20px; 11 | background-color: @well-bg; 12 | border: 1px solid @well-border; 13 | border-radius: @border-radius-base; 14 | .box-shadow(inset 0 1px 1px rgba(0,0,0,.05)); 15 | blockquote { 16 | border-color: #ddd; 17 | border-color: rgba(0,0,0,.15); 18 | } 19 | } 20 | 21 | // Sizes 22 | .well-lg { 23 | padding: 24px; 24 | border-radius: @border-radius-large; 25 | } 26 | .well-sm { 27 | padding: 9px; 28 | border-radius: @border-radius-small; 29 | } 30 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/tools/rdb/binding.gyp: -------------------------------------------------------------------------------- 1 | { 2 | "targets": [ 3 | { 4 | "target_name": "rdb", 5 | "sources": [ 6 | "rdb.cc", 7 | "db_wrapper.cc", 8 | "db_wrapper.h" 9 | ], 10 | "cflags_cc!": [ 11 | "-fno-exceptions" 12 | ], 13 | "cflags_cc+": [ 14 | "-std=c++11", 15 | ], 16 | "include_dirs+": [ 17 | "../../include" 18 | ], 19 | "libraries": [ 20 | "../../../librocksdb.a", 21 | "-lsnappy" 22 | ], 23 | } 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /thirdlib/ut/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | cmake_minimum_required(VERSION 2.8) 3 | 4 | set(PROJ_NAME uttest) 5 | 6 | file(GLOB SRCLIST *.c *.h) 7 | add_executable(${PROJ_NAME} ${SRCLIST}) 8 | 9 | include_directories ("./lib") 10 | include_directories ("../thirdlib/icl") 11 | 12 | add_subdirectory(lib) 13 | 14 | target_link_libraries(${PROJ_NAME} ut) 15 | 16 | if(UNIX) 17 | target_link_libraries(${PROJ_NAME} pthread) 18 | target_link_libraries(${PROJ_NAME} m) 19 | target_link_libraries(${PROJ_NAME} dl) 20 | ELSEIF(WIN32) 21 | target_link_libraries(${PROJ_NAME} ws2_32) 22 | target_link_libraries(${PROJ_NAME} Mswsock) 23 | endif(UNIX) 24 | 25 | set_target_properties(${PROJ_NAME} PROPERTIES FOLDER "libs") 26 | -------------------------------------------------------------------------------- /module/modules/src/NetAddress.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | 9 | #include "NetAddress.h" 10 | 11 | using namespace ff; 12 | 13 | 14 | NetAddress::NetAddress() 15 | { 16 | 17 | } 18 | 19 | NetAddress::NetAddress(std::string ip, int32_t port) 20 | { 21 | mip = ip; 22 | mport = port; 23 | } 24 | 25 | std::string NetAddress::ip() 26 | { 27 | return mip; 28 | } 29 | 30 | int32_t NetAddress::port() 31 | { 32 | return mport; 33 | } 34 | 35 | void NetAddress::setIp(const std::string& ip) 36 | { 37 | mip = ip; 38 | } 39 | 40 | void NetAddress::setPort(int32_t port) 41 | { 42 | mport = port; 43 | } 44 | -------------------------------------------------------------------------------- /thirdlib/cppformat-master/doc/_static/breathe.css: -------------------------------------------------------------------------------- 1 | 2 | /* -- breathe specific styles ----------------------------------------------- */ 3 | 4 | /* So enum value descriptions are displayed inline to the item */ 5 | .breatheenumvalues li tt + p { 6 | display: inline; 7 | } 8 | 9 | /* So parameter descriptions are displayed inline to the item */ 10 | .breatheparameterlist li tt + p { 11 | display: inline; 12 | } 13 | 14 | .container .breathe-sectiondef { 15 | width: inherit; 16 | } 17 | 18 | .github-btn { 19 | border: 0; 20 | overflow: hidden; 21 | } 22 | 23 | .jumbotron { 24 | background-size: 100% 4px; 25 | background-repeat: repeat-y; 26 | color: white; 27 | text-align: center; 28 | } 29 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/java/src/main/java/org/rocksdb/util/SizeUnit.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011-present, Facebook, Inc. All rights reserved. 2 | // This source code is licensed under the BSD-style license found in the 3 | // LICENSE file in the root directory of this source tree. An additional grant 4 | // of patent rights can be found in the PATENTS file in the same directory. 5 | 6 | package org.rocksdb.util; 7 | 8 | public class SizeUnit { 9 | public static final long KB = 1024L; 10 | public static final long MB = KB * KB; 11 | public static final long GB = KB * MB; 12 | public static final long TB = KB * GB; 13 | public static final long PB = KB * TB; 14 | 15 | private SizeUnit() {} 16 | } 17 | -------------------------------------------------------------------------------- /module/modulenetservice/src/NetAddress.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | 9 | #include "NetAddress.h" 10 | 11 | using namespace ff; 12 | 13 | 14 | NetAddress::NetAddress() 15 | { 16 | 17 | } 18 | 19 | NetAddress::NetAddress(std::string ip, int32_t port) 20 | { 21 | mip = ip; 22 | mport = port; 23 | } 24 | 25 | std::string NetAddress::ip() 26 | { 27 | return mip; 28 | } 29 | 30 | int32_t NetAddress::port() 31 | { 32 | return mport; 33 | } 34 | 35 | void NetAddress::setIp(const std::string& ip) 36 | { 37 | mip = ip; 38 | } 39 | 40 | void NetAddress::setPort(int32_t port) 41 | { 42 | mport = port; 43 | } 44 | -------------------------------------------------------------------------------- /cardgame/server/proto/cfg_loader.h: -------------------------------------------------------------------------------- 1 | #ifndef _CFG_LOADER_ 2 | #define _CFG_LOADER_ 3 | #include 4 | #include 5 | #include "cfg_data_impl.h" 6 | class cfg_loader{ 7 | public: static bool reload(std::string tab, std::vector> data){ 8 | if(tab == "miselite"){ 9 | return cfg_miselite_impl::instance().doLoad(data); 10 | } 11 | if(tab == "misnormal"){ 12 | return cfg_misnormal_impl::instance().doLoad(data); 13 | } 14 | if(tab == "mishero"){ 15 | return cfg_mishero_impl::instance().doLoad(data); 16 | } 17 | if(tab == "heros"){ 18 | return cfg_heros_impl::instance().doLoad(data); 19 | } 20 | return true; 21 | } 22 | }; 23 | #endif 24 | -------------------------------------------------------------------------------- /thirdlib/cppformat-master/doc/bootstrap/mixins/list-group.less: -------------------------------------------------------------------------------- 1 | // List Groups 2 | 3 | .list-group-item-variant(@state; @background; @color) { 4 | .list-group-item-@{state} { 5 | color: @color; 6 | background-color: @background; 7 | 8 | a& { 9 | color: @color; 10 | 11 | .list-group-item-heading { 12 | color: inherit; 13 | } 14 | 15 | &:hover, 16 | &:focus { 17 | color: @color; 18 | background-color: darken(@background, 5%); 19 | } 20 | &.active, 21 | &.active:hover, 22 | &.active:focus { 23 | color: #fff; 24 | background-color: @color; 25 | border-color: @color; 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /module/modules/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | cmake_minimum_required(VERSION 2.8) 3 | 4 | set(PROJ_NAME modules) 5 | file(GLOB SRCLIST ./src/*.*) 6 | 7 | add_library(${PROJ_NAME} STATIC ${SRCLIST}) 8 | 9 | include_directories( 10 | ./src/interface 11 | ${BASE_DIR}/src 12 | ${MODULE_DIR}/common 13 | ${THIRDLIB_DIR}/cppformat-master 14 | ${THIRDLIB_DIR}/spdlog-master/include/spdlog 15 | ${THIRDLIB_DIR}/rocksdb-master/include 16 | ${THIRDLIB_DIR}/ut/lib 17 | ) 18 | 19 | IF(WIN32) 20 | set(rocksdblib rocksdblib) 21 | ELSEIF(UNIX) 22 | set(rocksdblib rocksdb) 23 | ENDIF(WIN32) 24 | 25 | target_link_libraries(${PROJ_NAME} 26 | ${rocksdblib} 27 | ) 28 | 29 | set_target_properties(${PROJ_NAME} PROPERTIES FOLDER "modules") 30 | -------------------------------------------------------------------------------- /thirdlib/cppformat-master/doc/bootstrap/mixins/hide-text.less: -------------------------------------------------------------------------------- 1 | // CSS image replacement 2 | // 3 | // Heads up! v3 launched with with only `.hide-text()`, but per our pattern for 4 | // mixins being reused as classes with the same name, this doesn't hold up. As 5 | // of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`. 6 | // 7 | // Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757 8 | 9 | // Deprecated as of v3.0.1 (will be removed in v4) 10 | .hide-text() { 11 | font: ~"0/0" a; 12 | color: transparent; 13 | text-shadow: none; 14 | background-color: transparent; 15 | border: 0; 16 | } 17 | 18 | // New mixin to use as of v3.0.1 19 | .text-hide() { 20 | .hide-text(); 21 | } 22 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/_includes/plugins/like_button.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/tools/ldb.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011-present, Facebook, Inc. All rights reserved. 2 | // This source code is licensed under the BSD-style license found in the 3 | // LICENSE file in the root directory of this source tree. An additional grant 4 | // of patent rights can be found in the PATENTS file in the same directory. 5 | // 6 | #ifndef ROCKSDB_LITE 7 | 8 | #include "rocksdb/ldb_tool.h" 9 | 10 | int main(int argc, char** argv) { 11 | rocksdb::LDBTool tool; 12 | tool.Run(argc, argv); 13 | return 0; 14 | } 15 | #else 16 | #include 17 | int main(int argc, char** argv) { 18 | fprintf(stderr, "Not supported in lite mode.\n"); 19 | return 1; 20 | } 21 | #endif // ROCKSDB_LITE 22 | -------------------------------------------------------------------------------- /base/src/Framework.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | 9 | #ifndef _FF_FRAMEWORK_H_ 10 | #define _FF_FRAMEWORK_H_ 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | #include "IModule.h" 17 | 18 | namespace ff 19 | { 20 | /* 21 | 启动框架 22 | */ 23 | class Framework 24 | { 25 | public: 26 | Framework(); 27 | virtual ~Framework(); 28 | static Framework* instance(); 29 | 30 | bool doInit(); 31 | void doUninit(); 32 | void startLoop(); 33 | 34 | protected: 35 | virtual bool initialize() = 0; 36 | virtual void finalize() = 0; 37 | 38 | ModuleMgr mModuleMgr; 39 | }; 40 | } 41 | 42 | #endif -------------------------------------------------------------------------------- /demos/demo4_lua/src/ModuleTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | 9 | #ifndef _US_MODULE_TEST_ 10 | #define _US_MODULE_TEST_ 11 | 12 | #include 13 | #include 14 | 15 | #include "IModule.h" 16 | 17 | 18 | namespace ff 19 | { 20 | namespace demo 21 | { 22 | class ModuleTest : public ff::IModule 23 | { 24 | public: 25 | virtual bool initialize(ModuleMgr& mgr); 26 | virtual void finalize(); 27 | virtual void preStartLoop(); 28 | 29 | private: 30 | int32_t testFunc1(int32_t a, int32_t b); 31 | std::string testFunc2(std::string a, std::string b); 32 | }; 33 | } 34 | } 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/LANGUAGE-BINDINGS.md: -------------------------------------------------------------------------------- 1 | This is the list of all known third-party language bindings for RocksDB. If something is missing, please open a pull request to add it. 2 | 3 | * Java - https://github.com/facebook/rocksdb/tree/master/java 4 | * Python - http://pyrocksdb.readthedocs.org/en/latest/ 5 | * Perl - https://metacpan.org/pod/RocksDB 6 | * Node.js - https://npmjs.org/package/rocksdb 7 | * Go - https://github.com/tecbot/gorocksdb 8 | * Ruby - http://rubygems.org/gems/rocksdb-ruby 9 | * Haskell - https://hackage.haskell.org/package/rocksdb-haskell 10 | * PHP - https://github.com/Photonios/rocksdb-php 11 | * C# - https://github.com/warrenfalk/rocksdb-sharp 12 | * Rust - https://github.com/spacejam/rust-rocksdb 13 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/_posts/2014-05-22-rocksdb-3-1-release.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: RocksDB 3.1 release 3 | layout: post 4 | author: icanadi 5 | category: blog 6 | redirect_from: 7 | - /blog/575/rocksdb-3-1-release/ 8 | --- 9 | 10 | Check out the new release on [Github](https://github.com/facebook/rocksdb/releases/tag/rocksdb-3.1)! 11 | 12 | New features in RocksDB 3.1: 13 | 14 | * [Materialized hash index](https://github.com/facebook/rocksdb/commit/0b3d03d026a7248e438341264b4c6df339edc1d7) 15 | 16 | 17 | * [FIFO compaction style](https://github.com/facebook/rocksdb/wiki/FIFO-compaction-style) 18 | 19 | 20 | We released 3.1 so fast after 3.0 because one of our internal customers needed materialized hash index. 21 | -------------------------------------------------------------------------------- /cardgame/server/hotswaplogic/src/ModuleFriend.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | 9 | #ifndef _FF_MODULE_FRIEND_ 10 | #define _FF_MODULE_FRIEND_ 11 | 12 | #include 13 | #include 14 | #include "Player.h" 15 | #include "MsgMgr.h" 16 | #include "IModule.h" 17 | #include "csmsg.h" 18 | 19 | namespace ff 20 | { 21 | class ModuleFriend : public IModule 22 | { 23 | public: 24 | virtual bool initialize(ModuleMgr& mgr); 25 | virtual void finalize(); 26 | 27 | public: 28 | int netMsg(Player& player, const cs_friend_add& msg); 29 | int netMsg(Player& player, const cs_friend_mobility& msg); 30 | }; 31 | } 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/tools/sst_dump.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011-present, Facebook, Inc. All rights reserved. 2 | // This source code is licensed under the BSD-style license found in the 3 | // LICENSE file in the root directory of this source tree. An additional grant 4 | // of patent rights can be found in the PATENTS file in the same directory. 5 | // 6 | #ifndef ROCKSDB_LITE 7 | 8 | #include "rocksdb/sst_dump_tool.h" 9 | 10 | int main(int argc, char** argv) { 11 | rocksdb::SSTDumpTool tool; 12 | tool.Run(argc, argv); 13 | return 0; 14 | } 15 | #else 16 | #include 17 | int main(int argc, char** argv) { 18 | fprintf(stderr, "Not supported in lite mode.\n"); 19 | return 1; 20 | } 21 | #endif // ROCKSDB_LITE 22 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/util/build_version.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011-present, Facebook, Inc. All rights reserved. 2 | // This source code is licensed under the BSD-style license found in the 3 | // LICENSE file in the root directory of this source tree. An additional grant 4 | // of patent rights can be found in the PATENTS file in the same directory. 5 | // 6 | #pragma once 7 | #if !defined(IOS_CROSS_COMPILE) 8 | // if we compile with Xcode, we don't run build_detect_vesion, so we don't 9 | // generate these variables 10 | // this variable tells us about the git revision 11 | extern const char* rocksdb_build_git_sha; 12 | 13 | // Date on which the code was compiled: 14 | extern const char* rocksdb_build_compile_date; 15 | #endif 16 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/include/rocksdb/types.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011-present, Facebook, Inc. All rights reserved. 2 | // This source code is licensed under the BSD-style license found in the 3 | // LICENSE file in the root directory of this source tree. An additional grant 4 | // of patent rights can be found in the PATENTS file in the same directory. 5 | 6 | #ifndef STORAGE_ROCKSDB_INCLUDE_TYPES_H_ 7 | #define STORAGE_ROCKSDB_INCLUDE_TYPES_H_ 8 | 9 | #include 10 | 11 | namespace rocksdb { 12 | 13 | // Define all public custom types here. 14 | 15 | // Represents a sequence number in a WAL file. 16 | typedef uint64_t SequenceNumber; 17 | 18 | } // namespace rocksdb 19 | 20 | #endif // STORAGE_ROCKSDB_INCLUDE_TYPES_H_ 21 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/util/clock_cache.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011-present, Facebook, Inc. All rights reserved. 2 | // This source code is licensed under the BSD-style license found in the 3 | // LICENSE file in the root directory of this source tree. An additional grant 4 | // of patent rights can be found in the PATENTS file in the same directory. 5 | // 6 | // Copyright (c) 2011 The LevelDB Authors. All rights reserved. 7 | // Use of this source code is governed by a BSD-style license that can be 8 | // found in the LICENSE file. See the AUTHORS file for names of contributors. 9 | 10 | #pragma once 11 | 12 | #include "rocksdb/cache.h" 13 | 14 | #if defined(TBB) && !defined(ROCKSDB_LITE) 15 | #define SUPPORT_CLOCK_CACHE 16 | #endif 17 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/util/filter_policy.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011-present, Facebook, Inc. All rights reserved. 2 | // This source code is licensed under the BSD-style license found in the 3 | // LICENSE file in the root directory of this source tree. An additional grant 4 | // of patent rights can be found in the PATENTS file in the same directory. 5 | // 6 | // Copyright (c) 2012 The LevelDB Authors. All rights reserved. 7 | // Use of this source code is governed by a BSD-style license that can be 8 | // found in the LICENSE file. See the AUTHORS file for names of contributors. 9 | 10 | #include "rocksdb/filter_policy.h" 11 | 12 | namespace rocksdb { 13 | 14 | FilterPolicy::~FilterPolicy() { } 15 | 16 | } // namespace rocksdb 17 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/include/rocksdb/utilities/info_log_finder.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011-present, Facebook, Inc. All rights reserved. 2 | // This source code is licensed under the BSD-style license found in the 3 | // LICENSE file in the root directory of this source tree. An additional grant 4 | // of patent rights can be found in the PATENTS file in the same directory. 5 | 6 | #pragma once 7 | 8 | #include 9 | #include 10 | 11 | #include "rocksdb/db.h" 12 | #include "rocksdb/options.h" 13 | 14 | namespace rocksdb { 15 | 16 | // This function can be used to list the Information logs, 17 | // given the db pointer. 18 | Status GetInfoLogList(DB* db, std::vector* info_log_list); 19 | } // namespace rocksdb 20 | -------------------------------------------------------------------------------- /thirdlib/ut/lib/ut_error.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** simple net lib for windows and linux 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in ut_def.h 5 | */ 6 | 7 | 8 | 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "ut_error.h" 16 | 17 | #ifdef UT_PLATFORM_WINDOWS 18 | #include 19 | #endif 20 | 21 | #ifdef UT_PLATFORM_WINDOWS 22 | int32_t ut_lasterror() 23 | { 24 | return GetLastError(); 25 | } 26 | int32_t ut_wsalasterror() 27 | { 28 | return WSAGetLastError(); 29 | } 30 | #endif 31 | #ifdef UT_PLATFORM_LINUX 32 | int32_t ut_lasterror() 33 | { 34 | return errno; 35 | } 36 | int32_t ut_wsalasterror() 37 | { 38 | return errno; 39 | } 40 | #endif 41 | 42 | -------------------------------------------------------------------------------- /module/modulelua/src/ModuleLuaMachine.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | 9 | #ifndef _US_MODULE_LUAMACHINE_ 10 | #define _US_MODULE_LUAMACHINE_ 11 | 12 | #include "IModule.h" 13 | #include "ComponentTick.h" 14 | 15 | namespace ff 16 | { 17 | class ModuleLuaMachine : public IModule, public ComponentTick 18 | { 19 | public: 20 | virtual bool initialize(ModuleMgr& mgr); 21 | virtual void finalize(); 22 | virtual void preStartLoop(); 23 | 24 | bool reloadLuaMachine(); 25 | bool initLuaMachine(std::string entry); 26 | 27 | protected: 28 | virtual int64_t loopTick(int64_t delta); 29 | std::string mEntry; 30 | }; 31 | } 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /cardgame/server/hotswaplogic/src/ModulePackHero.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | 9 | #ifndef _FF_MODULE_PACKHERO_ 10 | #define _FF_MODULE_PACKHERO_ 11 | 12 | #include 13 | #include 14 | #include "Player.h" 15 | #include "MsgMgr.h" 16 | #include "IModule.h" 17 | #include "csmsg.h" 18 | 19 | namespace ff 20 | { 21 | class ModulePackHero : public IModule 22 | { 23 | public: 24 | virtual bool initialize(ModuleMgr& mgr); 25 | virtual void finalize(); 26 | 27 | public: 28 | int netMsg(Player& player, const cs_pack_hero& msg); 29 | int netMsg(Player& player, const cs_select_teammember& msg); 30 | }; 31 | 32 | 33 | } 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /thirdlib/cppformat-master/doc/bootstrap/mixins/clearfix.less: -------------------------------------------------------------------------------- 1 | // Clearfix 2 | // 3 | // For modern browsers 4 | // 1. The space content is one way to avoid an Opera bug when the 5 | // contenteditable attribute is included anywhere else in the document. 6 | // Otherwise it causes space to appear at the top and bottom of elements 7 | // that are clearfixed. 8 | // 2. The use of `table` rather than `block` is only necessary if using 9 | // `:before` to contain the top-margins of child elements. 10 | // 11 | // Source: http://nicolasgallagher.com/micro-clearfix-hack/ 12 | 13 | .clearfix() { 14 | &:before, 15 | &:after { 16 | content: " "; // 1 17 | display: table; // 2 18 | } 19 | &:after { 20 | clear: both; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /demos/demo2_modulecomponent/src/ModuleTestComponent.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | 9 | #include "ModuleTestComponent.h" 10 | #include "base.h" 11 | 12 | 13 | using namespace ff::demo; 14 | using namespace ff; 15 | 16 | bool ModuleTestComponent::initialize(ModuleMgr& mgr) 17 | { 18 | mTick = 0; 19 | SYSLOG_DEBUG("ModuleTestComponent initialize."); 20 | return true; 21 | } 22 | 23 | void ModuleTestComponent::finalize() 24 | { 25 | SYSLOG_DEBUG("ModuleTestComponent finalize."); 26 | } 27 | 28 | int64_t ModuleTestComponent::loopTick(int64_t delta) 29 | { 30 | mTick++; 31 | SYSLOG_DEBUG("{} ModuleTestComponent hello tick.", mTick); 32 | return 1000; 33 | } -------------------------------------------------------------------------------- /demos/demo5_netclient/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | cmake_minimum_required(VERSION 2.8) 3 | 4 | set(PROJ_NAME demo5_netclient) 5 | file(GLOB SRCLIST ./src/*.*) 6 | 7 | add_executable(${PROJ_NAME} ${SRCLIST}) 8 | 9 | include_directories( 10 | ./src/ 11 | ${BASE_DIR}/src 12 | ${LAUNCHER_DIR}/src 13 | ${THIRDLIB_DIR}/cppformat-master 14 | ${MODULE_DIR}/modules/src 15 | ${THIRDLIB_DIR}/ut/lib 16 | ) 17 | 18 | IF(WIN32) 19 | set(ws2_32 ws2_32) 20 | ELSEIF(UNIX) 21 | set(dl dl) 22 | set(pthread pthread) 23 | ENDIF(WIN32) 24 | 25 | target_link_libraries(${PROJ_NAME} 26 | base 27 | launcher 28 | cppformat 29 | modules 30 | ut 31 | ${ws2_32} 32 | ${dl} 33 | ${pthread} 34 | ) 35 | 36 | set_target_properties(${PROJ_NAME} PROPERTIES FOLDER "advanced.demo") -------------------------------------------------------------------------------- /demos/demo5_netserver/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | cmake_minimum_required(VERSION 2.8) 3 | 4 | set(PROJ_NAME demo5_netserver) 5 | file(GLOB SRCLIST ./src/*.*) 6 | 7 | add_executable(${PROJ_NAME} ${SRCLIST}) 8 | 9 | include_directories( 10 | ./src/ 11 | ${BASE_DIR}/src 12 | ${LAUNCHER_DIR}/src 13 | ${THIRDLIB_DIR}/cppformat-master 14 | ${MODULE_DIR}/modules/src 15 | ${THIRDLIB_DIR}/ut/lib 16 | ) 17 | 18 | IF(WIN32) 19 | set(ws2_32 ws2_32) 20 | ELSEIF(UNIX) 21 | set(dl dl) 22 | set(pthread pthread) 23 | ENDIF(WIN32) 24 | 25 | target_link_libraries(${PROJ_NAME} 26 | base 27 | launcher 28 | cppformat 29 | modules 30 | ut 31 | ${ws2_32} 32 | ${dl} 33 | ${pthread} 34 | ) 35 | 36 | set_target_properties(${PROJ_NAME} PROPERTIES FOLDER "advanced.demo") -------------------------------------------------------------------------------- /demos/demo7_chatserver/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | cmake_minimum_required(VERSION 2.8) 3 | 4 | set(PROJ_NAME demo7_chatserver) 5 | file(GLOB SRCLIST ./src/*.*) 6 | 7 | add_executable(${PROJ_NAME} ${SRCLIST}) 8 | 9 | include_directories( 10 | ./src/ 11 | ${BASE_DIR}/src 12 | ${LAUNCHER_DIR}/src 13 | ${THIRDLIB_DIR}/cppformat-master 14 | ${MODULE_DIR}/modules/src 15 | ${THIRDLIB_DIR}/ut/lib 16 | ) 17 | 18 | IF(WIN32) 19 | set(ws2_32 ws2_32) 20 | ELSEIF(UNIX) 21 | set(dl dl) 22 | set(pthread pthread) 23 | ENDIF(WIN32) 24 | 25 | target_link_libraries(${PROJ_NAME} 26 | base 27 | launcher 28 | cppformat 29 | modules 30 | ut 31 | ${ws2_32} 32 | ${dl} 33 | ${pthread} 34 | ) 35 | 36 | set_target_properties(${PROJ_NAME} PROPERTIES FOLDER "project.demo") -------------------------------------------------------------------------------- /thirdlib/cppformat-master/doc/bootstrap/breadcrumbs.less: -------------------------------------------------------------------------------- 1 | // 2 | // Breadcrumbs 3 | // -------------------------------------------------- 4 | 5 | 6 | .breadcrumb { 7 | padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal; 8 | margin-bottom: @line-height-computed; 9 | list-style: none; 10 | background-color: @breadcrumb-bg; 11 | border-radius: @border-radius-base; 12 | 13 | > li { 14 | display: inline-block; 15 | 16 | + li:before { 17 | content: "@{breadcrumb-separator}\00a0"; // Unicode space added since inline-block means non-collapsing white-space 18 | padding: 0 5px; 19 | color: @breadcrumb-color; 20 | } 21 | } 22 | 23 | > .active { 24 | color: @breadcrumb-active-color; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /thirdlib/cppformat-master/doc/bootstrap/responsive-embed.less: -------------------------------------------------------------------------------- 1 | // Embeds responsive 2 | // 3 | // Credit: Nicolas Gallagher and SUIT CSS. 4 | 5 | .embed-responsive { 6 | position: relative; 7 | display: block; 8 | height: 0; 9 | padding: 0; 10 | overflow: hidden; 11 | 12 | .embed-responsive-item, 13 | iframe, 14 | embed, 15 | object, 16 | video { 17 | position: absolute; 18 | top: 0; 19 | left: 0; 20 | bottom: 0; 21 | height: 100%; 22 | width: 100%; 23 | border: 0; 24 | } 25 | } 26 | 27 | // Modifier class for 16:9 aspect ratio 28 | .embed-responsive-16by9 { 29 | padding-bottom: 56.25%; 30 | } 31 | 32 | // Modifier class for 4:3 aspect ratio 33 | .embed-responsive-4by3 { 34 | padding-bottom: 75%; 35 | } 36 | -------------------------------------------------------------------------------- /demos/demo3_modules/src/ModuleTest1.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | 9 | #ifndef _US_MODULE_TEST1_ 10 | #define _US_MODULE_TEST1_ 11 | 12 | #include "IModule.h" 13 | #include "ComponentTick.h" 14 | #include "ModuleTest2.h" 15 | 16 | namespace ff 17 | { 18 | namespace demo 19 | { 20 | class ModuleTest1 : public ff::IModule, public ff::ComponentTick 21 | { 22 | public: 23 | virtual bool initialize(ModuleMgr& mgr); 24 | virtual void finalize(); 25 | 26 | public: 27 | void hello(); 28 | 29 | private: 30 | virtual int64_t loopTick(int64_t delta); 31 | 32 | private: 33 | ModuleTest2* mModuleTest2; 34 | }; 35 | } 36 | } 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /demos/demo7_chatclient/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | cmake_minimum_required(VERSION 2.8) 3 | 4 | set(PROJ_NAME demo7_chatclient) 5 | file(GLOB SRCLIST ./src/*.*) 6 | 7 | add_executable(${PROJ_NAME} ${SRCLIST}) 8 | 9 | include_directories( 10 | ./src/ 11 | ${BASE_DIR}/src 12 | ${LAUNCHER_DIR}/src 13 | ${THIRDLIB_DIR}/cppformat-master 14 | ${MODULE_DIR}/modules/src 15 | ${THIRDLIB_DIR}/ut/lib 16 | ) 17 | 18 | IF(WIN32) 19 | set(ws2_32 ws2_32) 20 | ELSEIF(UNIX) 21 | set(dl dl) 22 | set(pthread pthread) 23 | ENDIF(WIN32) 24 | 25 | target_link_libraries(${PROJ_NAME} 26 | base 27 | launcher 28 | cppformat 29 | modules 30 | ut 31 | ${ws2_32} 32 | ${dl} 33 | ${pthread} 34 | ) 35 | 36 | set_target_properties(${PROJ_NAME} PROPERTIES FOLDER "project.demo") 37 | -------------------------------------------------------------------------------- /cardgame/server/hotswaplogic/src/ModuleShop.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | 9 | #ifndef _FF_MODULE_SHOP_ 10 | #define _FF_MODULE_SHOP_ 11 | 12 | #include 13 | #include 14 | #include "Player.h" 15 | #include "MsgMgr.h" 16 | #include "IModule.h" 17 | #include "csmsg.h" 18 | 19 | namespace ff 20 | { 21 | class ModuleShop : public IModule 22 | { 23 | public: 24 | virtual bool initialize(ModuleMgr& mgr); 25 | virtual void finalize(); 26 | 27 | public: 28 | int netMsg(Player& player, const cs_buy_hero& msg); 29 | int netMsg(Player& player, const cs_shop_item& msg); 30 | int netMsg(Player& player, const cs_charge& msg); 31 | }; 32 | } 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /module/modulelua/src/LuaMachine.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | #ifndef _UTS_LUA_MACHINE_ 9 | #define _UTS_LUA_MACHINE_ 10 | 11 | #include 12 | #include "Singleton.h" 13 | #include "lua.hpp" 14 | 15 | namespace ff 16 | { 17 | class LuaMachine : public Singleton 18 | { 19 | public: 20 | LuaMachine(); 21 | 22 | public: 23 | static const char* sLuaGlobalDataName; 24 | 25 | ~LuaMachine(); 26 | static LuaMachine* create(); 27 | 28 | bool init(); 29 | bool switchLuaState(lua_State* L); 30 | void uninit(); 31 | bool tick(int64_t delta); 32 | 33 | lua_State* getLuaState(); 34 | 35 | private: 36 | lua_State* mL; 37 | }; 38 | } 39 | #endif -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/java/src/main/java/org/rocksdb/StringAppendOperator.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Vlad Balan (vlad.gm@gmail.com). All rights reserved. 2 | // This source code is licensed under the BSD-style license found in the 3 | // LICENSE file in the root directory of this source tree. An additional grant 4 | // of patent rights can be found in the PATENTS file in the same directory. 5 | 6 | package org.rocksdb; 7 | 8 | /** 9 | * StringAppendOperator is a merge operator that concatenates 10 | * two strings. 11 | */ 12 | public class StringAppendOperator implements MergeOperator { 13 | @Override public long newMergeOperatorHandle() { 14 | return newMergeOperatorHandleImpl(); 15 | } 16 | private native long newMergeOperatorHandleImpl(); 17 | } 18 | -------------------------------------------------------------------------------- /thirdlib/ut/lib/ut_net_util.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** simple net lib for windows and linux 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in ut_def.h 5 | */ 6 | 7 | 8 | 9 | #ifndef _NET_UTIL_ 10 | #define _NET_UTIL_ 11 | 12 | #include "ut_defines.h" 13 | 14 | __C_BEGIN_DECLS 15 | 16 | 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include "ut_error.h" 24 | 25 | 26 | #ifdef UT_PLATFORM_LINUX 27 | #define INVALID_SOCKET (-1) 28 | #define SOCKET_ERROR (-1) 29 | #else 30 | #define MSG_NOSIGNAL 0 31 | #endif 32 | 33 | typedef int32_t sock_handle_t; 34 | 35 | #define SOCKET_SUCCESS (0) 36 | 37 | #define LISTEN_QUE_SIZE 128 38 | 39 | __C_END_DECLS 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /cardgame/server/frame/src/HotSwapPluginProxy.cpp: -------------------------------------------------------------------------------- 1 | 2 | 3 | #include "HotSwapPluginProxy.h" 4 | 5 | using namespace ff; 6 | 7 | HotSwapPluginProxy::HotSwapPluginProxy() 8 | { 9 | mImpl = nullptr; 10 | } 11 | 12 | bool HotSwapPluginProxy::good() 13 | { 14 | return mImpl != nullptr; 15 | } 16 | 17 | void HotSwapPluginProxy::reset(HotSwapPlugin* impl) 18 | { 19 | mImpl = impl; 20 | } 21 | 22 | bool HotSwapPluginProxy::init(HotSwapService* serve) 23 | { 24 | return mImpl->init(serve); 25 | } 26 | 27 | void HotSwapPluginProxy::unit() 28 | { 29 | mImpl->unit(); 30 | } 31 | 32 | int HotSwapPluginProxy::netMsg(Player& player, int32_t msgid, const char* msg, int32_t len) 33 | { 34 | SYS_CHECK_RV(player.isLogined(), -1); 35 | 36 | return mImpl->netMsg(player, msgid, msg, len); 37 | } -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/include/rocksdb/version.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011-present, Facebook, Inc. All rights reserved. 2 | // This source code is licensed under the BSD-style license found in the 3 | // LICENSE file in the root directory of this source tree. An additional grant 4 | // of patent rights can be found in the PATENTS file in the same directory. 5 | #pragma once 6 | 7 | #define ROCKSDB_MAJOR 5 8 | #define ROCKSDB_MINOR 0 9 | #define ROCKSDB_PATCH 0 10 | 11 | // Do not use these. We made the mistake of declaring macros starting with 12 | // double underscore. Now we have to live with our choice. We'll deprecate these 13 | // at some point 14 | #define __ROCKSDB_MAJOR__ ROCKSDB_MAJOR 15 | #define __ROCKSDB_MINOR__ ROCKSDB_MINOR 16 | #define __ROCKSDB_PATCH__ ROCKSDB_PATCH 17 | -------------------------------------------------------------------------------- /thirdlib/ut/lib/ut_errcode.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** simple net lib for windows and linux 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in ut_def.h 5 | */ 6 | 7 | 8 | 9 | #include "ut_errcode.h" 10 | 11 | 12 | ut_err_code_t ut_make_err_code(int32_t code) 13 | { 14 | ut_err_code_t err_code; 15 | err_code.code = code; 16 | return err_code; 17 | } 18 | 19 | int32_t ut_isequal(ut_err_code_t c1, ut_err_code_t c2) 20 | { 21 | return c1.code == c2.code; 22 | } 23 | 24 | int32_t ut_get_errcode(ut_err_code_t errcode) 25 | { 26 | return errcode.code; 27 | } 28 | 29 | int32_t ut_ec_issuccess(ut_err_code_t errcode) 30 | { 31 | return ut_isequal(errcode, ut_success); 32 | } 33 | 34 | int32_t ut_ec_iserror(ut_err_code_t errcode) 35 | { 36 | return !ut_isequal(errcode, ut_success); 37 | } -------------------------------------------------------------------------------- /cardgame/server/frame/src/ModuleLogin.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | 9 | #ifndef _FF_MODULE_LOGIN_ 10 | #define _FF_MODULE_LOGIN_ 11 | 12 | #include "IModule.h" 13 | #include "Player.h" 14 | 15 | #include "csmsg.h" 16 | #include "scmsg.h" 17 | 18 | #include "ModuleRocksDb.h" 19 | #include "ModuleDataSync.h" 20 | 21 | namespace ff 22 | { 23 | class ModuleLogin : public IModule 24 | { 25 | public: 26 | virtual bool initialize(ModuleMgr& mgr); 27 | virtual void finalize(); 28 | 29 | public: 30 | int32_t netMsg(Player& player, const cs_login& msg); 31 | 32 | private: 33 | ff::ModuleRocksDb* mModuleRocksDb; 34 | ModuleDataSync* mModuleDataSync; 35 | }; 36 | } 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /launcher/src/CommandLineOption.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | #ifndef _US_COMMANDLINE_OPTION_ 9 | #define _US_COMMANDLINE_OPTION_ 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | namespace ff 16 | { 17 | class CommandLineOption 18 | { 19 | public: 20 | void setOption(const std::string& name, bool required); 21 | bool parse(int32_t num, char* args[]); 22 | bool isSet(const std::string& name); 23 | std::string getOption(const std::string& name); 24 | 25 | private: 26 | bool isOption(const std::string& val); 27 | 28 | private: 29 | std::map mRequired; 30 | std::map mOptions; 31 | }; 32 | } 33 | #endif -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/_includes/nav/collection_nav_group.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/doc-type-examples/2016-04-07-blog-post-example.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Blog Post Example 3 | layout: post 4 | author: exampleauthor 5 | category: blog 6 | --- 7 | 8 | Any local blog posts would go in the `_posts` directory. 9 | 10 | This is an example blog post introduction, try to keep it short and about a paragraph long, to encourage people to click through to read the entire post. 11 | 12 | 13 | 14 | Everything below the `` tag will only show on the actual blog post page, not on the `/blog/` index. 15 | 16 | Author is defined in `_data/authors.yml` 17 | 18 | 19 | ## No posts? 20 | 21 | If you have no blog for your site, you can remove the entire `_posts` folder. Otherwise add markdown files in here. See CONTRIBUTING.md for details. 22 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/java/src/main/java/org/rocksdb/BuiltinComparator.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011-present, Facebook, Inc. All rights reserved. 2 | // This source code is licensed under the BSD-style license found in the 3 | // LICENSE file in the root directory of this source tree. An additional grant 4 | // of patent rights can be found in the PATENTS file in the same directory. 5 | 6 | package org.rocksdb; 7 | 8 | /** 9 | * Builtin RocksDB comparators 10 | * 11 | *
    12 | *
  1. BYTEWISE_COMPARATOR - Sorts all keys in ascending bytewise 13 | * order.
  2. 14 | *
  3. REVERSE_BYTEWISE_COMPARATOR - Sorts all keys in descending bytewise 15 | * order
  4. 16 | *
17 | */ 18 | public enum BuiltinComparator { 19 | BYTEWISE_COMPARATOR, REVERSE_BYTEWISE_COMPARATOR 20 | } 21 | -------------------------------------------------------------------------------- /base/src/ValueOpt.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | 9 | #ifndef _FF_VALUEOPT_ 10 | #define _FF_VALUEOPT_ 11 | 12 | #include 13 | #include 14 | 15 | namespace ff 16 | { 17 | // 基本类型转换 18 | class ValueOpt 19 | { 20 | public: 21 | template 22 | static std::string convert(T t) 23 | { 24 | std::ostringstream os; 25 | os << t; 26 | return os.str(); 27 | } 28 | 29 | template 30 | static T convert(std::string str) 31 | { 32 | T t{}; 33 | std::istringstream is(str); 34 | is >> t; 35 | return t; 36 | } 37 | 38 | static std::string convert(const std::string& str) 39 | { 40 | return str; 41 | } 42 | }; 43 | } 44 | 45 | #endif -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/port/stack_trace.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011-present, Facebook, Inc. All rights reserved. 2 | // This source code is licensed under the BSD-style license found in the 3 | // LICENSE file in the root directory of this source tree. An additional grant 4 | // of patent rights can be found in the PATENTS file in the same directory. 5 | // 6 | #pragma once 7 | namespace rocksdb { 8 | namespace port { 9 | 10 | // Install a signal handler to print callstack on the following signals: 11 | // SIGILL SIGSEGV SIGBUS SIGABRT 12 | // Currently supports linux only. No-op otherwise. 13 | void InstallStackTraceHandler(); 14 | 15 | // Prints stack, skips skip_first_frames frames 16 | void PrintStack(int first_frames_to_skip = 0); 17 | 18 | } // namespace port 19 | } // namespace rocksdb 20 | -------------------------------------------------------------------------------- /base/src/Singleton.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | #ifndef _FF_SINGLETON_ 9 | #define _FF_SINGLETON_ 10 | 11 | #include 12 | 13 | namespace ff 14 | { 15 | // 单件基类 16 | template 17 | class Singleton 18 | { 19 | private: 20 | Singleton(const Singleton&) = delete; 21 | void operator=(const Singleton&) = delete; 22 | 23 | protected: 24 | Singleton() 25 | { 26 | static Singleton* mInstance = nullptr; 27 | assert(mInstance == nullptr); 28 | mInstance = this; 29 | }; 30 | virtual ~Singleton(){}; 31 | 32 | public: 33 | // 所有单件必须在主线程中实例化 34 | static T& instance() 35 | { 36 | static T t; 37 | return t; 38 | } 39 | 40 | private: 41 | }; 42 | } 43 | #endif -------------------------------------------------------------------------------- /cardgame/server/hotswaplogic/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | cmake_minimum_required(VERSION 2.8) 3 | 4 | set(PROJ_NAME card_game_logic) 5 | file(GLOB SRCLIST ./src/*.*) 6 | 7 | add_library(${PROJ_NAME} SHARED ${SRCLIST}) 8 | 9 | include_directories( 10 | ./src/ 11 | ../proto 12 | ${BASE_DIR}/src 13 | ${THIRDLIB_DIR}/cppformat-master 14 | ${THIRDLIB_DIR}/protobuf-master/src 15 | ./../frame/src/interface 16 | ) 17 | 18 | target_link_libraries(${PROJ_NAME} 19 | base 20 | cppformat 21 | protobuf 22 | card_game_proto 23 | ) 24 | 25 | set_target_properties(${PROJ_NAME} PROPERTIES FOLDER "game.card") 26 | SET_TARGET_PROPERTIES(card_game_logic PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${ROOT_DIR}/bin/cardgame) 27 | SET_TARGET_PROPERTIES(card_game_logic PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${ROOT_DIR}/bin/cardgame) 28 | -------------------------------------------------------------------------------- /cardgame/server/frame/src/HotSwapPluginProxy.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | ** Free game server engine 4 | ** 5 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 6 | */ 7 | 8 | 9 | #ifndef _FF_HOTSWAPPLUGIN_PROXY_ 10 | #define _FF_HOTSWAPPLUGIN_PROXY_ 11 | #include 12 | #include "HotSwapPlugin.h" 13 | #include "Singleton.h" 14 | 15 | namespace ff 16 | { 17 | class HotSwapPluginProxy : public HotSwapPlugin, public Singleton 18 | { 19 | public: 20 | HotSwapPluginProxy(); 21 | bool good(); 22 | void reset(HotSwapPlugin* impl); 23 | 24 | virtual bool init(HotSwapService* serve); 25 | virtual void unit(); 26 | virtual int32_t netMsg(Player& player, int32_t msgid, const char* msg, int32_t len); 27 | 28 | private: 29 | HotSwapPlugin* mImpl; 30 | }; 31 | } 32 | 33 | 34 | #endif -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/build_tools/version.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | if [ "$#" = "0" ]; then 3 | echo "Usage: $0 major|minor|patch|full" 4 | exit 1 5 | fi 6 | 7 | if [ "$1" = "major" ]; then 8 | cat include/rocksdb/version.h | grep MAJOR | head -n1 | awk '{print $3}' 9 | fi 10 | if [ "$1" = "minor" ]; then 11 | cat include/rocksdb/version.h | grep MINOR | head -n1 | awk '{print $3}' 12 | fi 13 | if [ "$1" = "patch" ]; then 14 | cat include/rocksdb/version.h | grep PATCH | head -n1 | awk '{print $3}' 15 | fi 16 | if [ "$1" = "full" ]; then 17 | awk '/#define ROCKSDB/ { env[$2] = $3 } 18 | END { printf "%s.%s.%s\n", env["ROCKSDB_MAJOR"], 19 | env["ROCKSDB_MINOR"], 20 | env["ROCKSDB_PATCH"] }' \ 21 | include/rocksdb/version.h 22 | fi 23 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/port/xpress.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011-present, Facebook, Inc. All rights reserved. 2 | // This source code is licensed under the BSD-style license found in the 3 | // LICENSE file in the root directory of this source tree. An additional grant 4 | // of patent rights can be found in the PATENTS file in the same directory. 5 | // 6 | // Copyright (c) 2011 The LevelDB Authors. All rights reserved. 7 | // Use of this source code is governed by a BSD-style license that can be 8 | // found in the LICENSE file. See the AUTHORS file for names of contributors. 9 | 10 | #pragma once 11 | 12 | // Xpress on Windows is implemeted using Win API 13 | #if defined(ROCKSDB_PLATFORM_POSIX) 14 | #error "Xpress compression not implemented" 15 | #elif defined(OS_WIN) 16 | #include "port/win/xpress_win.h" 17 | #endif 18 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/util/string_util.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011-present, Facebook, Inc. All rights reserved. 2 | // This source code is licensed under the BSD-style license found in the 3 | // LICENSE file in the root directory of this source tree. An additional grant 4 | // of patent rights can be found in the PATENTS file in the same directory. 5 | // 6 | #include 7 | #include 8 | #include 9 | #include "util/string_util.h" 10 | 11 | namespace rocksdb { 12 | 13 | std::vector StringSplit(const std::string& arg, char delim) { 14 | std::vector splits; 15 | std::stringstream ss(arg); 16 | std::string item; 17 | while (std::getline(ss, item, delim)) { 18 | splits.push_back(item); 19 | } 20 | return splits; 21 | } 22 | 23 | } // namespace rocksdb 24 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/java/src/test/java/org/rocksdb/CompressionOptionsTest.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011-present, Facebook, Inc. All rights reserved. 2 | // This source code is licensed under the BSD-style license found in the 3 | // LICENSE file in the root directory of this source tree. An additional grant 4 | // of patent rights can be found in the PATENTS file in the same directory. 5 | 6 | package org.rocksdb; 7 | 8 | import org.junit.Test; 9 | 10 | 11 | public class CompressionOptionsTest { 12 | @Test 13 | public void getCompressionType() { 14 | for (final CompressionType compressionType : CompressionType.values()) { 15 | String libraryName = compressionType.getLibraryName(); 16 | compressionType.equals(CompressionType.getCompressionType( 17 | libraryName)); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/_data/authors.yml: -------------------------------------------------------------------------------- 1 | icanadi: 2 | full_name: Igor Canadi 3 | fbid: 706165749 4 | 5 | xjin: 6 | full_name: Xing Jin 7 | fbid: 100000739847320 8 | 9 | leijin: 10 | full_name: Lei Jin 11 | fbid: 634570164 12 | 13 | yhciang: 14 | full_name: Yueh-Hsuan Chiang 15 | fbid: 1619020986 16 | 17 | radheshyam: 18 | full_name: Radheshyam Balasundaram 19 | fbid: 800837305 20 | 21 | zagfox: 22 | full_name: Feng Zhu 23 | fbid: 100006493823622 24 | 25 | lgalanis: 26 | full_name: Leonidas Galanis 27 | fbid: 8649950 28 | 29 | sdong: 30 | full_name: Siying Dong 31 | fbid: 9805119 32 | 33 | dmitrism: 34 | full_name: Dmitri Smirnov 35 | 36 | rven2: 37 | full_name: Venkatesh Radhakrishnan 38 | fbid: 100008352697325 39 | 40 | yiwu: 41 | full_name: Yi Wu 42 | fbid: 100000476362039 43 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/_posts/2014-05-19-rocksdb-3-0-release.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: RocksDB 3.0 release 3 | layout: post 4 | author: icanadi 5 | category: blog 6 | redirect_from: 7 | - /blog/557/rocksdb-3-0-release/ 8 | --- 9 | 10 | Check out new RocksDB release on [Github](https://github.com/facebook/rocksdb/releases/tag/3.0.fb)! 11 | 12 | New features in RocksDB 3.0: 13 | 14 | * [Column Family support](https://github.com/facebook/rocksdb/wiki/Column-Families) 15 | 16 | 17 | * [Ability to chose different checksum function](https://github.com/facebook/rocksdb/commit/0afc8bc29a5800e3212388c327c750d32e31f3d6) 18 | 19 | 20 | * Deprecated ReadOptions::prefix_seek and ReadOptions::prefix 21 | 22 | 23 | 24 | Check out the full [change log](https://github.com/facebook/rocksdb/blob/3.0.fb/HISTORY.md). 25 | -------------------------------------------------------------------------------- /thirdlib/ut/lib/ut_errcode.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** simple net lib for windows and linux 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in ut_def.h 5 | */ 6 | 7 | 8 | 9 | #ifndef _UT_ERRCODE_H_ 10 | #define _UT_ERRCODE_H_ 11 | 12 | #include 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | #define ut_success ut_make_err_code(0) 19 | #define ut_error ut_make_err_code(-1) 20 | 21 | typedef struct ut_err_code{int32_t code;const char* msg;} ut_err_code_t; 22 | 23 | ut_err_code_t ut_make_err_code(int32_t code); 24 | int32_t ut_isequal(ut_err_code_t c1, ut_err_code_t c2); 25 | int32_t ut_ec_issuccess(ut_err_code_t errcode); 26 | int32_t ut_ec_iserror(ut_err_code_t errcode); 27 | int32_t ut_get_errcode(ut_err_code_t errcode); 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | 33 | #endif -------------------------------------------------------------------------------- /cardgame/proto/scmsg.proto: -------------------------------------------------------------------------------- 1 | 2 | message sc_login_res 3 | { 4 | optional int32 res = 1; 5 | } 6 | 7 | message sc_talk 8 | { 9 | optional bytes from = 1; 10 | optional int32 type = 2; 11 | optional bytes msg = 3; 12 | } 13 | 14 | message sc_player_data 15 | { 16 | optional bytes data = 1; 17 | } 18 | 19 | message sc_battle_action 20 | { 21 | optional int32 act = 1; 22 | optional int32 from = 2; 23 | optional int32 to = 3; 24 | optional int32 value = 4; 25 | } 26 | 27 | message sc_battle_report 28 | { 29 | repeated int32 lchar = 1; 30 | repeated int32 rchar = 2; 31 | repeated sc_battle_action actions = 3; 32 | } 33 | 34 | message scmsg 35 | { 36 | optional sc_login_res login_res = 1; 37 | optional sc_talk talk = 2; 38 | optional sc_player_data player_data = 3; 39 | optional sc_battle_report battle_report = 4; 40 | } 41 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/java/src/main/java/org/rocksdb/RemoveEmptyValueCompactionFilter.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011-present, Facebook, Inc. All rights reserved. 2 | // This source code is licensed under the BSD-style license found in the 3 | // LICENSE file in the root directory of this source tree. An additional grant 4 | // of patent rights can be found in the PATENTS file in the same directory. 5 | 6 | package org.rocksdb; 7 | 8 | /** 9 | * Just a Java wrapper around EmptyValueCompactionFilter implemented in C++ 10 | */ 11 | public class RemoveEmptyValueCompactionFilter 12 | extends AbstractCompactionFilter { 13 | public RemoveEmptyValueCompactionFilter() { 14 | super(createNewRemoveEmptyValueCompactionFilter0()); 15 | } 16 | 17 | private native static long createNewRemoveEmptyValueCompactionFilter0(); 18 | } 19 | -------------------------------------------------------------------------------- /cardgame/server/frame/src/PlayerImpl.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "PlayerImpl.h" 3 | 4 | using namespace ff; 5 | 6 | PlayerImpl::PlayerImpl(NetService* netService, int32_t netid) 7 | { 8 | mNetService = netService; 9 | mNetId = netid; 10 | } 11 | 12 | void PlayerImpl::disconnect() 13 | { 14 | mNetService->close(mNetId); 15 | } 16 | 17 | bool PlayerImpl::send(const char* data, int32_t len) 18 | { 19 | return mNetService->send(mNetId, data, len); 20 | } 21 | 22 | bool PlayerImpl::isLogined() 23 | { 24 | return mLogined; 25 | } 26 | 27 | PlayerData& PlayerImpl::data() 28 | { 29 | return mData; 30 | } 31 | 32 | void PlayerImpl::setLogined(bool logined) 33 | { 34 | mLogined = logined; 35 | } 36 | 37 | PlayerDataImpl& PlayerImpl::dataImpl() 38 | { 39 | return mData; 40 | } 41 | 42 | int32_t PlayerImpl::getNetId() 43 | { 44 | return mNetId; 45 | } -------------------------------------------------------------------------------- /cardgame/server/hotswaplogic/src/CardGameLogicPlugin.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | #ifndef _FF_CARDGAME_LOGINPLUGIN_ 4 | #define _FF_CARDGAME_LOGINPLUGIN_ 5 | #include 6 | #include "HotSwapPlugin.h" 7 | #include "HotSwapService.h" 8 | #include "ModuleMsgTrigger.h" 9 | #include "Player.h" 10 | 11 | namespace ff 12 | { 13 | class CardGameLogicPlugin : public HotSwapPlugin 14 | { 15 | public: 16 | CardGameLogicPlugin(); 17 | ~CardGameLogicPlugin(); 18 | 19 | virtual bool init(HotSwapService* serve); 20 | virtual void unit(); 21 | virtual int32_t netMsg(Player& player, int32_t msgid, const char* msg, int32_t len); 22 | 23 | private: 24 | HotSwapService* mServe; 25 | ModuleMsgTrigger* mModuleMsgTrigger; 26 | }; 27 | } 28 | 29 | extern "C" 30 | { 31 | DLLExport ff::HotSwapPlugin* getPlugin(); 32 | } 33 | 34 | #endif 35 | 36 | 37 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to RocksDB 2 | 3 | ## Contributor License Agreement ("CLA") 4 | 5 | In order to accept your pull request, we need you to submit a CLA. You 6 | only need to do this once, so if you've done this for another Facebook 7 | open source project, you're good to go. If you are submitting a pull 8 | request for the first time, just let us know that you have completed 9 | the CLA and we can cross-check with your GitHub username. 10 | 11 | Complete your CLA here: 12 | 13 | If you prefer to sign a paper copy, we can send you a PDF. Send us an 14 | e-mail or create a new github issue to request the CLA in PDF format. 15 | 16 | ## License 17 | 18 | By contributing to RocksDB, you agree that your contributions will be 19 | licensed under the [BSD License](LICENSE). 20 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/java/src/test/java/org/rocksdb/StatsCallbackMock.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011-present, Facebook, Inc. All rights reserved. 2 | // This source code is licensed under the BSD-style license found in the 3 | // LICENSE file in the root directory of this source tree. An additional grant 4 | // of patent rights can be found in the PATENTS file in the same directory. 5 | 6 | package org.rocksdb; 7 | 8 | public class StatsCallbackMock implements StatisticsCollectorCallback { 9 | public int tickerCallbackCount = 0; 10 | public int histCallbackCount = 0; 11 | 12 | public void tickerCallback(TickerType tickerType, long tickerCount) { 13 | tickerCallbackCount++; 14 | } 15 | 16 | public void histogramCallback(HistogramType histType, 17 | HistogramData histData) { 18 | histCallbackCount++; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /cardgame/server/proto/IMarkDirty.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _IMARK_DIRTY_ 3 | #define _IMARK_DIRTY_ 4 | 5 | #include 6 | #include 7 | 8 | class IMarkDirty 9 | { 10 | public: 11 | enum 12 | { 13 | DB_DIRTY = 1 << 0, 14 | SYNC_DIRTY = 1 << 1, 15 | }; 16 | 17 | public: 18 | virtual void clearDirty(int type) = 0; 19 | virtual void markDirty(int idx, int type) = 0; 20 | 21 | void addChild(int idx, IMarkDirty* child) 22 | { 23 | mChilds[idx].push_back(child); 24 | } 25 | 26 | void removeChild(int idx) 27 | { 28 | mChilds.erase(idx); 29 | } 30 | 31 | void clearChildDirty(int type) 32 | { 33 | for (auto kv : mChilds) 34 | { 35 | for (IMarkDirty* md : kv.second) 36 | { 37 | md->clearDirty(type); 38 | } 39 | } 40 | } 41 | private: 42 | std::map> mChilds; 43 | }; 44 | 45 | #endif -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/arcanist_util/unit_engine/FacebookFbcodeUnitTestEngine.php: -------------------------------------------------------------------------------- 1 | setName("dummy_placeholder_entry"); 14 | $result->setResult(ArcanistUnitTestResult::RESULT_PASS); 15 | return array($result); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/util/env_chroot.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2016-present, Facebook, Inc. All rights reserved. 2 | // This source code is licensed under the BSD-style license found in the 3 | // LICENSE file in the root directory of this source tree. An additional grant 4 | // of patent rights can be found in the PATENTS file in the same directory. 5 | 6 | #pragma once 7 | 8 | #if !defined(ROCKSDB_LITE) && !defined(OS_WIN) 9 | 10 | #include 11 | 12 | #include "rocksdb/env.h" 13 | 14 | namespace rocksdb { 15 | 16 | // Returns an Env that translates paths such that the root directory appears to 17 | // be chroot_dir. chroot_dir should refer to an existing directory. 18 | Env* NewChrootEnv(Env* base_env, const std::string& chroot_dir); 19 | 20 | } // namespace rocksdb 21 | 22 | #endif // !defined(ROCKSDB_LITE) && !defined(OS_WIN) 23 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/DUMP_FORMAT.md: -------------------------------------------------------------------------------- 1 | ## RocksDB dump format 2 | 3 | The version 1 RocksDB dump format is fairly simple: 4 | 5 | 1) The dump starts with the magic 8 byte identifier "ROCKDUMP" 6 | 7 | 2) The magic is followed by an 8 byte big-endian version which is 0x00000001. 8 | 9 | 3) Next are arbitrarily sized chunks of bytes prepended by 4 byte little endian number indicating how large each chunk is. 10 | 11 | 4) The first chunk is special and is a json string indicating some things about the creation of this dump. It contains the following keys: 12 | * database-path: The path of the database this dump was created from. 13 | * hostname: The hostname of the machine where the dump was created. 14 | * creation-time: Unix seconds since epoc when this dump was created. 15 | 16 | 5) Following the info dump the slices paired into are key/value pairs. 17 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/arcanist_util/unit_engine/FacebookOldFbcodeUnitTestEngine.php: -------------------------------------------------------------------------------- 1 | setName("dummy_placeholder_entry"); 14 | $result->setResult(ArcanistUnitTestResult::RESULT_PASS); 15 | return array($result); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/java/crossbuild/Vagrantfile: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | 4 | # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! 5 | VAGRANTFILE_API_VERSION = "2" 6 | 7 | Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| 8 | 9 | config.vm.define "linux32" do |linux32| 10 | linux32.vm.box = "hansode/centos-5.6-i386" 11 | end 12 | 13 | config.vm.define "linux64" do |linux64| 14 | linux64.vm.box = "hansode/centos-5.6-x86_64" 15 | end 16 | 17 | config.vm.provider "virtualbox" do |v| 18 | v.memory = 2048 19 | v.cpus = 4 20 | end 21 | 22 | config.vm.provision :shell, path: "build-linux-centos.sh" 23 | config.vm.synced_folder "../target", "/rocksdb-build" 24 | config.vm.synced_folder "../..", "/rocksdb", type: "rsync" 25 | config.vm.boot_timeout = 1200 26 | end 27 | -------------------------------------------------------------------------------- /thirdlib/ut/lib/ut_sprintf.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** simple net lib for windows and linux 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in ut_def.h 5 | */ 6 | 7 | 8 | #include "ut_sprintf.h" 9 | #include "ut_defines.h" 10 | #include 11 | 12 | int32_t ut_snprintf(char* dstbuf, int32_t bufsize, const char* fmt, ...) 13 | { 14 | int32_t nr = 0; 15 | va_list arglist; 16 | va_start(arglist, fmt); 17 | nr = ut_svnprintf(dstbuf, bufsize, fmt, arglist); 18 | va_end(arglist); 19 | 20 | return nr; 21 | } 22 | 23 | int32_t ut_svnprintf(char* dstbuf, int32_t bufsize, const char* fmt, va_list argptr) 24 | { 25 | UT_ASSERT_RV (dstbuf!=0 && bufsize>0 && fmt!=0, -1); 26 | 27 | #ifdef UT_PLATFORM_WINDOWS 28 | return vsnprintf_s(dstbuf, bufsize, _TRUNCATE, fmt, argptr); 29 | #else 30 | return vsnprintf(dstbuf, bufsize, fmt, argptr); 31 | #endif 32 | } -------------------------------------------------------------------------------- /module/moduleactor/src/ActorNormalWorker.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** Free game server engine 3 | ** 4 | ** Copyright (C) 2016 Eleven. See Copyright Notice in base.h 5 | */ 6 | 7 | 8 | #include "ActorNormalWorker.h" 9 | #include "ModuleActor.h" 10 | #include "base.h" 11 | 12 | using namespace ff; 13 | 14 | ActorNormalWorker::Work::Work(std::function work) 15 | { 16 | mWork = work; 17 | } 18 | 19 | bool ActorNormalWorker::initialize() 20 | { 21 | return true; 22 | } 23 | 24 | void ActorNormalWorker::finalize() 25 | { 26 | 27 | } 28 | 29 | int32_t ActorNormalWorker::loopTick(int32_t delta) 30 | { 31 | return 1; 32 | } 33 | 34 | bool ActorNormalWorker::doWork(ActorWork* work) 35 | { 36 | ActorNormalWorker::Work* nwork = dynamic_cast(work); 37 | SYS_VERIFY_RV(nwork != nullptr, false); 38 | nwork->mWork(); 39 | 40 | return true; 41 | } -------------------------------------------------------------------------------- /thirdlib/cppformat-master/doc/bootstrap/component-animations.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component animations 3 | // -------------------------------------------------- 4 | 5 | // Heads up! 6 | // 7 | // We don't use the `.opacity()` mixin here since it causes a bug with text 8 | // fields in IE7-8. Source: https://github.com/twbs/bootstrap/pull/3552. 9 | 10 | .fade { 11 | opacity: 0; 12 | .transition(opacity .15s linear); 13 | &.in { 14 | opacity: 1; 15 | } 16 | } 17 | 18 | .collapse { 19 | display: none; 20 | 21 | &.in { display: block; } 22 | tr&.in { display: table-row; } 23 | tbody&.in { display: table-row-group; } 24 | } 25 | 26 | .collapsing { 27 | position: relative; 28 | height: 0; 29 | overflow: hidden; 30 | .transition-property(~"height, visibility"); 31 | .transition-duration(.35s); 32 | .transition-timing-function(ease); 33 | } 34 | -------------------------------------------------------------------------------- /thirdlib/iniparser-master/test/Makefile: -------------------------------------------------------------------------------- 1 | CC ?= gcc 2 | 3 | ifndef V 4 | QUIET_CC = @echo "CC $@"; 5 | QUIET_MAKE_TESTS = @echo "GN Alltests.c"; 6 | endif 7 | 8 | DEPS = $(shell ls ../src/*.[ch]) 9 | 10 | SRC = $(shell ls *.c | sed 's/AllTests.c//') 11 | OBJ = $(SRC:.c=.o) 12 | 13 | INCLUDE = -I../src 14 | CFLAGS = -pipe -ansi -pedantic -Wall -Wextra -g 15 | LDFLAGS = 16 | all: check 17 | 18 | check: testrun 19 | @./testrun 20 | 21 | testrun: AllTests.o $(OBJ) 22 | $(QUIET_CC)$(CC) -o $@ AllTests.o $(OBJ) $(LDFLAGS) 23 | 24 | AllTests.o: $(OBJ) 25 | $(QUIET_MAKE_TESTS)./make-tests.sh > AllTests.c 26 | $(QUIET_CC)$(CC) -c -o AllTests.o AllTests.c $(CFLAGS) $(INCLUDE) 27 | 28 | %.o: %.c $(DEPS) 29 | $(QUIET_CC)$(CC) -c -o $@ $< $(CFLAGS) $(INCLUDE) 30 | 31 | clean veryclean: 32 | rm -rf AllTests.c 33 | rm -rf $(OBJ) AllTests.o 34 | rm -rf testrun 35 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/docs/_posts/2016-02-25-rocksdb-ama.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: RocksDB AMA 3 | layout: post 4 | author: yhchiang 5 | category: blog 6 | redirect_from: 7 | - /blog/3065/rocksdb-ama/ 8 | --- 9 | 10 | RocksDB developers are doing a Reddit Ask-Me-Anything now at 10AM – 11AM PDT! We welcome you to stop by and ask any RocksDB related questions, including existing / upcoming features, tuning tips, or database design. 11 | 12 | Here are some enhancements that we'd like to focus on over the next six months: 13 | 14 | * 2-Phase Commit 15 | * Lua support in some custom functions 16 | * Backup and repair tools 17 | * Direct I/O to bypass OS cache 18 | * RocksDB Java API 19 | 20 | [https://www.reddit.com/r/IAmA/comments/47k1si/we_are_rocksdb_developers_ask_us_anything/](https://www.reddit.com/r/IAmA/comments/47k1si/we_are_rocksdb_developers_ask_us_anything/) 21 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/table/bloom_block.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011-present, Facebook, Inc. All rights reserved. 2 | // This source code is licensed under the BSD-style license found in the 3 | // LICENSE file in the root directory of this source tree. An additional grant 4 | // of patent rights can be found in the PATENTS file in the same directory. 5 | 6 | #include "table/bloom_block.h" 7 | 8 | #include 9 | #include "rocksdb/slice.h" 10 | #include "util/dynamic_bloom.h" 11 | 12 | namespace rocksdb { 13 | 14 | void BloomBlockBuilder::AddKeysHashes(const std::vector& keys_hashes) { 15 | for (auto hash : keys_hashes) { 16 | bloom_.AddHash(hash); 17 | } 18 | } 19 | 20 | Slice BloomBlockBuilder::Finish() { return bloom_.GetRawData(); } 21 | 22 | const std::string BloomBlockBuilder::kBloomBlock = "kBloomBlock"; 23 | } // namespace rocksdb 24 | -------------------------------------------------------------------------------- /thirdlib/rocksdb-master/tools/verify_random_db.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # A shell script to verify DB generated by generate_random_db.sh cannot opened and read correct data. 4 | # ./ldb needs to be avaible to be executed. 5 | # 6 | # Usage: