[General] Use boost for IPC

This commit is contained in:
momo5502 2017-01-27 10:17:33 +01:00
parent 8f705d2c37
commit 454e358882
26 changed files with 147 additions and 1 deletions

69
.gitmodules vendored
View File

@ -35,3 +35,72 @@
path = deps/protobuf
url = https://github.com/google/protobuf.git
branch = 3.2.x
[submodule "deps/boost/interprocess"]
path = deps/boost/interprocess
url = https://github.com/boostorg/interprocess.git
[submodule "deps/boost/config"]
path = deps/boost/config
url = https://github.com/boostorg/config.git
[submodule "deps/boost/date_time"]
path = deps/boost/date_time
url = https://github.com/boostorg/date_time.git
[submodule "deps/boost/assert"]
path = deps/boost/assert
url = https://github.com/boostorg/assert.git
[submodule "deps/boost/utility"]
path = deps/boost/utility
url = https://github.com/boostorg/utility.git
[submodule "deps/boost/detail"]
path = deps/boost/detail
url = https://github.com/boostorg/detail.git
[submodule "deps/boost/winapi"]
path = deps/boost/winapi
url = https://github.com/boostorg/winapi.git
[submodule "deps/boost/integer"]
path = deps/boost/integer
url = https://github.com/boostorg/integer.git
[submodule "deps/boost/move"]
path = deps/boost/move
url = https://github.com/boostorg/move.git
[submodule "deps/boost/static_assert"]
path = deps/boost/static_assert
url = https://github.com/boostorg/static_assert.git
[submodule "deps/boost/container"]
path = deps/boost/container
url = https://github.com/boostorg/container.git
[submodule "deps/boost/intrusive"]
path = deps/boost/intrusive
url = https://github.com/boostorg/intrusive.git
[submodule "deps/boost/core"]
path = deps/boost/core
url = https://github.com/boostorg/core.git
[submodule "deps/boost/functional"]
path = deps/boost/functional
url = https://github.com/boostorg/functional.git
[submodule "deps/boost/type_traits"]
path = deps/boost/type_traits
url = https://github.com/boostorg/type_traits.git
[submodule "deps/boost/preprocessor"]
path = deps/boost/preprocessor
url = https://github.com/boostorg/preprocessor.git
[submodule "deps/boost/smart_ptr"]
path = deps/boost/smart_ptr
url = https://github.com/boostorg/smart_ptr.git
[submodule "deps/boost/throw_exception"]
path = deps/boost/throw_exception
url = https://github.com/boostorg/throw_exception.git
[submodule "deps/boost/predef"]
path = deps/boost/predef
url = https://github.com/boostorg/predef.git
[submodule "deps/boost/mpl"]
path = deps/boost/mpl
url = https://github.com/boostorg/mpl.git
[submodule "deps/boost/unordered"]
path = deps/boost/unordered
url = https://github.com/boostorg/unordered.git
[submodule "deps/boost/iterator"]
path = deps/boost/iterator
url = https://github.com/boostorg/iterator.git
[submodule "deps/boost/tuple"]
path = deps/boost/tuple
url = https://github.com/boostorg/tuple.git

1
deps/boost/assert vendored Submodule

@ -0,0 +1 @@
Subproject commit 89e5b86c469c993ea4c53ebc7ed4a9b133f785a6

1
deps/boost/config vendored Submodule

@ -0,0 +1 @@
Subproject commit b4628d91eb8b2cbf96e3dadee3d6bff97b50ae46

1
deps/boost/container vendored Submodule

@ -0,0 +1 @@
Subproject commit 23e9e8b4946f8b026ced6b048d7a62b4ca81b722

1
deps/boost/core vendored Submodule

@ -0,0 +1 @@
Subproject commit 1abd68102d26d87109b5eda8d80f8bb0382ce4df

1
deps/boost/date_time vendored Submodule

@ -0,0 +1 @@
Subproject commit 47cf10d5fd7cee50d4e53a6132c69a7e1cbb2d0b

1
deps/boost/detail vendored Submodule

@ -0,0 +1 @@
Subproject commit 6c111975865d112c11101ef8221695cc4cd57562

1
deps/boost/functional vendored Submodule

@ -0,0 +1 @@
Subproject commit c592e854919730597b1793f85667e7d88f000d29

1
deps/boost/integer vendored Submodule

@ -0,0 +1 @@
Subproject commit 13b153c657697129cabe7ac8b3e62ef844a62945

1
deps/boost/interprocess vendored Submodule

@ -0,0 +1 @@
Subproject commit 0cd4548b45a9b9fdac2c58f2acb793095754f821

1
deps/boost/intrusive vendored Submodule

@ -0,0 +1 @@
Subproject commit 286f597606de0d139e256af8c2695d90535be905

1
deps/boost/iterator vendored Submodule

@ -0,0 +1 @@
Subproject commit 760da84f9cbbe87afb7ef845ef5fa6be158637b7

1
deps/boost/move vendored Submodule

@ -0,0 +1 @@
Subproject commit 135e598bc4ffc63001d84f93764fddee234f1da2

1
deps/boost/mpl vendored Submodule

@ -0,0 +1 @@
Subproject commit 3b126bdf8c7abbfef27101232a379c8e0c3db1ac

1
deps/boost/predef vendored Submodule

@ -0,0 +1 @@
Subproject commit 822d09f19bc2f4ea6f42da8e0be83d10ce912ce1

1
deps/boost/preprocessor vendored Submodule

@ -0,0 +1 @@
Subproject commit d8389ffda600ce73d62b077616987744f5f83453

1
deps/boost/smart_ptr vendored Submodule

@ -0,0 +1 @@
Subproject commit 19147212a9edd1facdc9a17cf586b79c92f4116a

1
deps/boost/static_assert vendored Submodule

@ -0,0 +1 @@
Subproject commit c2f58a187a67502a20aaa14c88625f12e400c5c1

1
deps/boost/throw_exception vendored Submodule

@ -0,0 +1 @@
Subproject commit f94638e5225afff877347576ff7b4170971e7a2a

1
deps/boost/tuple vendored Submodule

@ -0,0 +1 @@
Subproject commit 895af7c97a2f74980eb459badf67787c2a3ecadf

1
deps/boost/type_traits vendored Submodule

@ -0,0 +1 @@
Subproject commit 4fffc7637da8479e3f94674ef1dd0fc996a7d027

1
deps/boost/unordered vendored Submodule

@ -0,0 +1 @@
Subproject commit 57cc6d4bac1cc93fb8fb05696116b184f3d1fecc

1
deps/boost/utility vendored Submodule

@ -0,0 +1 @@
Subproject commit ccfd741c0a423e6c8dc4493e3a4e042b5a34a329

1
deps/boost/winapi vendored Submodule

@ -0,0 +1 @@
Subproject commit b017fd886612a9001dfdffeb1aa4663b6e2acda8

View File

@ -304,7 +304,32 @@ workspace "iw4x"
}
includedirs {
"%{prj.location}/src",
"./src"
"./src",
-- boost includes
"./deps/boost/mpl/include",
"./deps/boost/core/include",
"./deps/boost/move/include",
"./deps/boost/assert/include",
"./deps/boost/predef/include",
"./deps/boost/config/include",
"./deps/boost/detail/include",
"./deps/boost/winapi/include",
"./deps/boost/integer/include",
"./deps/boost/tuple/include",
"./deps/boost/iterator/include",
"./deps/boost/utility/include",
"./deps/boost/container/include",
"./deps/boost/unordered/include",
"./deps/boost/date_time/include",
"./deps/boost/type_traits/include",
"./deps/boost/preprocessor/include",
"./deps/boost/smart_ptr/include",
"./deps/boost/throw_exception/include",
"./deps/boost/functional/include",
"./deps/boost/intrusive/include",
"./deps/boost/interprocess/include",
"./deps/boost/static_assert/include",
}
resincludedirs {
"$(ProjectDir)src" -- fix for VS IDE

View File

@ -1,5 +1,21 @@
#include "STDInclude.hpp"
namespace boost
{
typedef unsigned long long ulong_long_type;
}
#pragma warning(push)
#pragma warning(disable: 4091)
#undef sleep
//#define BOOST_DISABLE_WIN32
#define BOOST_USE_WINDOWS_H
#define BOOST_DATE_TIME_NO_LIB
#include <boost/interprocess/ipc/message_queue.hpp>
#pragma warning(pop)
namespace Components
{
Pipe IPCPipe::ServerPipe;
@ -242,4 +258,17 @@ namespace Components
IPCPipe::ServerPipe.destroy();
IPCPipe::ClientPipe.destroy();
}
void test()
{
boost::interprocess::message_queue::remove("message_queue");
//Create a message_queue.
boost::interprocess::message_queue mq
(boost::interprocess::create_only //only create
, "message_queue" //name
, 100 //max message number
, sizeof(int) //max message size
);
}
}