Coder Social home page Coder Social logo

organic-code / breep Goto Github PK

View Code? Open in Web Editor NEW
138.0 11.0 21.0 499 KB

C++ peer to peer library, built on the top of boost

License: European Union Public License 1.1

C++ 99.75% CMake 0.25%
cplusplus-14 peer-to-peer high-level library networking network-library cplusplus p2p

breep's Introduction

Breep

What is Breep?

Breep is a c++ bridged peer to peer library. What does that mean? It means that even though the network is constructed as a peer to peer one, there may be no direct connections between two dudes, say A and B, if these connections are impossible (due to poorly configured ports, for example). In that case, Breep will attempt to use another peer C as a bridge between A and B.
Breep is also a high-level library. You don't have to care on when peers connect, disconnect, send data, and on how to send your classes. You simply register listeners that get notified when peers come and go, when they send you stuff. You may even use serialization and send your own object directly through the network. Same goes for your listeners: you don't say 'I want to listen for piles of bytes', but instead you say 'I want to listen for fancy::MyClass'.

How do I use Breep::network ?

The best way to now it is to read the tutorials. Alternatively, you may read some examples and the online doc. But as a little preview, here is a 'Hello World!'-type example:

Here is how to create a network, start listening on port 1234, and send "Hello!" to any budy that connects:

BREEP_DECLARE_TYPE(std::string)

void co_listener(breep::tcp::network& network, const breep::tcp::peer& source) {
	network.send_object_to(source, std::string("Hello!"));
}

int main() {
	breep::tcp::network network(1234);
	network.add_connection_listener(&co_listener);
	network.sync_awake();
	return 0;
}

The BREEP_DECLARE_TYPE involved here is used to tell to breep::network that we will listen/send some std::strings. If you forget to do it, you will get a compile-time error.

There is how to do the opposite: the network starts listening on port 1233, tries to connect at localhost:1234, prints the first message it sees, then disconnect:

BREEP_DECLARE_TYPE(std::string)

void data_listener(breep::tcp::netdata_wrapper<std::string>& dw) {
    std::cout << dw.data << std::endl;
    dw.network.disconnect();
}

int main() {
    breep::tcp::network network(1233);
    network.add_data_listener<std::string>(&data_listener);
    if (!network.connect(boost::asio::ip::address_v4::loopback(), 1234)) {
        std::cout << "Failed to connect.\n";
        return 1;
    }
    network.join();
    return 0;
}

Please don't get confused: there is no UDP in this lib (yet).

Why should I use Breep::network ?

  • It's awesome!
  • It's high level: you can directly send and receive objects.
  • The overhead for this is low: if you set up well your serialization, you only have a fixed 64bits extra overhead (compared to sending raw bytes to the p2p network — in comparison, TCP has 320bits of overhead only for its header)
  • It's easy to get in: just read the examples, you'll see!

Why should I NOT use Breep::network ?

  • It has not been tested as much as it should have been.
  • It's probably broken for BigEndian architecture (I have no way to test this, sorry ; a warning should be displayed on such architectures.)
  • It's very, very slow to compile with.

Requirements

Resource Requirement
Compiler C++14 compliant or above
Boost Boost 1.55 or above

Road Map

Milestone Feature Status
0.1 Peer to peer network management complete
0.1 Instantiated objects delivery complete
1.0 Improved serialization complete
1.0 Multiple objects delivery in one go complete
x.x Client server network management on hold

The project is currently on testing stage before the release of Breep 1.0.0

License

This work is under the European Union Public License v1.1.

You may get a copy of this license in your language from the European Commission here.

Extract of article 13 :

All linguistic versions of this Licence, approved by the European Commission, have identical value.
Parties can take advantage of the linguistic version of their choice.

Author

Lucas Lazare, an IT student frustrated from not being able to properly use java's broken network library, and inspired by KryoNet

breep's People

Contributors

organic-code avatar tonykero avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

breep's Issues

Adding user data in basic_peer

It could be useful to have the possibility of adding data in basic_peer, accessible from user code, so that they can avoid using an extra map of their own when they would otherwise need it

Conan package for Breep

Hello,
Do you know about Conan?
Conan is modern dependency manager for C++. And will be great if your library will be available via package manager for other developers.

Here you can find example, how you can create package for the library.

If you have any questions, just ask :-)

Peer bridging is broken

The forwarding requests seem to have no effect, leading to no one bridging for each other.

Possibility for network discovery/broadcast messages?

I'm interested in using this library for a project involving ad-hoc network building. How would you suggest building network discovery features to Breep? The simplest way that I can think of is to add broadcast messaging (using UDP, I suppose) to build a routing table. At least one problem with that, though, is that UDP still needs a router I think. Is there some forum where we could discuss this?

Alternatively, do you have links to sources where I can learn true peer-to-peer communication paradigm? Perhaps you have a diagram of Breep's comm flow or know of a similar one.

Cheers

Enable raw and smart pointer serialization

Pointers serialization does not work out of the box. this is a missing feature, and deep serialization should be enabled for raw pointers and smart pointers (namely std::weak_ptr, std::shared_ptr and std::unique_ptr)

Add a packet class

It may be useful to add a packet class overloading << operator, so as to be able to send more than one class at once

Add an ID system?

Anyone can connect to any peer network (provided that they have the same protocol ID), even though they are from a completely different program

Although this is unlikely, it should be taken into account, maybe by adding an ID when the network is created and checking it on incomming connections.

Add stream watchers?

It could be nice to be able to add a watcher so that you can know when you are receiving bytes, even if data are not completely received yet

Add a client-server model

Breed currently supports only peer-to-peer network architecture. It could be nice to add a client-server architecture.

Logger in wrong namespace

For example, in /include/breep/network/detail/object_builder.hpp, the logger is referenced as breep::logger.

I believe it should be breep::detail::logger.

This error was found while compiling the example code chat.

Edit: This was using g++<4.9. This doesn't occur with g++5

Edit2: Now getting a lot of BREEP_DECLARE_TEMPLATE-based errors. Saying things like:
template argument 1 is invalid, parse error in template argument list, expected unqualified-id before '...' token. It says in type_traits.hpp to use BREEP_DECLARE_TYPE instead of BREEP_DECLARE_TEMPLATE if getting errors. Is this the recommended action to take (editing basic_peer.hpp, io_manager_base.hpp, etc?

In file included from ../../include/breep/network/tcp.hpp:21:0,
                 from main.cpp:23:
../../include/breep/util/type_traits.hpp:66:221: error: expected ‘;’ at end of member declaration
          const std::string universal_name = std::string(#TType"<") + networking_traits_impl<typename std::tuple_element<0, std::tuple<T...>>::type>().universal_name + detail::identifier_from_tuple<detail::remove_type<0, T...>>().value + ">"; \
                                                                                                                                                                                                                             ^
../../include/breep/network/basic_peer.hpp:166:1: note: in expansion of macro ‘BREEP_DECLARE_TEMPLATE’
 BREEP_DECLARE_TEMPLATE(breep::basic_peer)
 ^
../../include/breep/util/type_traits.hpp:66:221: error: declaration of ‘const string breep::detail::networking_traits_impl<breep::basic_peer<T ...> >::T’
          const std::string universal_name = std::string(#TType"<") + networking_traits_impl<typename std::tuple_element<0, std::tuple<T...>>::type>().universal_name + detail::identifier_from_tuple<detail::remove_type<0, T...>>().value + ">"; \
                                                                                                                                                                                                                             ^
../../include/breep/network/basic_peer.hpp:166:1: note: in expansion of macro ‘BREEP_DECLARE_TEMPLATE’
 BREEP_DECLARE_TEMPLATE(breep::basic_peer)
 ^
../../include/breep/util/type_traits.hpp:63:16: error:  shadows template parm ‘class ... T’
      template <typename... T> \
                ^
../../include/breep/network/basic_peer.hpp:166:1: note: in expansion of macro ‘BREEP_DECLARE_TEMPLATE’
 BREEP_DECLARE_TEMPLATE(breep::basic_peer)
 ^
../../include/breep/util/type_traits.hpp:66:222: error: expected unqualified-id before ‘...’ token
          const std::string universal_name = std::string(#TType"<") + networking_traits_impl<typename std::tuple_element<0, std::tuple<T...>>::type>().universal_name + detail::identifier_from_tuple<detail::remove_type<0, T...>>().value + ">"; \
                                                                                                                                                                                                                              ...

Change the serialization system

Because of the way boost's serialization is used, it is not possible to send a class without first copying it (at least for const refs), which is quite bad.

One solution could be to implement a custom serialization system.

Compilation of the examples on Ubuntu 16.04 fails

Checked out both current master branch and 0.1.0 tag.
When trying to compile the examples by calling make, I get the following output:
Building chat.elf [ -- ] (1/1) Building main.o from main.cpp...In file included from ../../include/breep/network/tcp.hpp:21:0, from main.cpp:21: ../../include/breep/util/type_traits.hpp:66:221: error: expected ‘;’ at end of member declaration const std::string universal_name = std::string(#TType"<") + networking_traits_impl<typename std::tuple_element<0, std::tuple<T...>>::type>().universal_name + detail::identifier_from_tuple<detail::remove_type<0, T...>>().value + ">"; \ ^ ../../include/breep/network/detail/object_builder.hpp:151:1: note: in expansion of macro ‘BREEP_DECLARE_TEMPLATE’ BREEP_DECLARE_TEMPLATE(breep::detail::object_builder) ^ ../../include/breep/util/type_traits.hpp:66:221: error: declaration of ‘const string breep::detail::networking_traits_impl<breep::detail::object_builder<T ...> >::T’ const std::string universal_name = std::string(#TType"<") + networking_traits_impl<typename std::tuple_element<0, std::tuple<T...>>::type>().universal_name + detail::identifier_from_tuple<detail::remove_type<0, T...>>().value + ">"; \ ^ ../../include/breep/network/detail/object_builder.hpp:151:1: note: in expansion of macro ‘BREEP_DECLARE_TEMPLATE’ BREEP_DECLARE_TEMPLATE(breep::detail::object_builder) ^ ../../include/breep/util/type_traits.hpp:63:16: error: shadows template parm ‘class ... T’ template <typename... T> \ ^ ../../include/breep/network/detail/object_builder.hpp:151:1: note: in expansion of macro ‘BREEP_DECLARE_TEMPLATE’ BREEP_DECLARE_TEMPLATE(breep::detail::object_builder) ^ ../../include/breep/util/type_traits.hpp:66:222: error: expected unqualified-id before ‘...’ token const std::string universal_name = std::string(#TType"<") + networking_traits_impl<typename std::tuple_element<0, std::tuple<T...>>::type>().universal_name + detail::identifier_from_tuple<detail::remove_type<0, T...>>().value + ">"; \ ^ ../../include/breep/network/detail/object_builder.hpp:151:1: note: in expansion of macro ‘BREEP_DECLARE_TEMPLATE’ BREEP_DECLARE_TEMPLATE(breep::detail::object_builder) ^ ../../include/breep/util/type_traits.hpp:66:206: error: parse error in template argument list const std::string universal_name = std::string(#TType"<") + networking_traits_impl<typename std::tuple_element<0, std::tuple<T...>>::type>().universal_name + detail::identifier_from_tuple<detail::remove_type<0, T...>>().value + ">"; \ ^ ../../include/breep/network/detail/object_builder.hpp:151:1: note: in expansion of macro ‘BREEP_DECLARE_TEMPLATE’ BREEP_DECLARE_TEMPLATE(breep::detail::object_builder) ^ ../../include/breep/util/type_traits.hpp:66:206: error: template argument 1 is invalid const std::string universal_name = std::string(#TType"<") + networking_traits_impl<typename std::tuple_element<0, std::tuple<T...>>::type>().universal_name + detail::identifier_from_tuple<detail::remove_type<0, T...>>().value + ">"; \ ^ ../../include/breep/network/detail/object_builder.hpp:151:1: note: in expansion of macro ‘BREEP_DECLARE_TEMPLATE’ BREEP_DECLARE_TEMPLATE(breep::detail::object_builder) ^ ../../include/breep/util/type_traits.hpp:66:221: error: expected ‘;’ at end of member declaration const std::string universal_name = std::string(#TType"<") + networking_traits_impl<typename std::tuple_element<0, std::tuple<T...>>::type>().universal_name + detail::identifier_from_tuple<detail::remove_type<0, T...>>().value + ">"; \ ^ ../../include/breep/network/io_manager_base.hpp:158:1: note: in expansion of macro ‘BREEP_DECLARE_TEMPLATE’ BREEP_DECLARE_TEMPLATE(breep::io_manager_base) ^ ../../include/breep/util/type_traits.hpp:66:221: error: declaration of ‘const string breep::detail::networking_traits_impl<breep::io_manager_base<T ...> >::T’ const std::string universal_name = std::string(#TType"<") + networking_traits_impl<typename std::tuple_element<0, std::tuple<T...>>::type>().universal_name + detail::identifier_from_tuple<detail::remove_type<0, T...>>().value + ">"; \ ^ ../../include/breep/network/io_manager_base.hpp:158:1: note: in expansion of macro ‘BREEP_DECLARE_TEMPLATE’ BREEP_DECLARE_TEMPLATE(breep::io_manager_base) ^ ../../include/breep/util/type_traits.hpp:63:16: error: shadows template parm ‘class ... T’ template <typename... T> \ ^ ../../include/breep/network/io_manager_base.hpp:158:1: note: in expansion of macro ‘BREEP_DECLARE_TEMPLATE’ BREEP_DECLARE_TEMPLATE(breep::io_manager_base) ^ ../../include/breep/util/type_traits.hpp:66:222: error: expected unqualified-id before ‘...’ token const std::string universal_name = std::string(#TType"<") + networking_traits_impl<typename std::tuple_element<0, std::tuple<T...>>::type>().universal_name + detail::identifier_from_tuple<detail::remove_type<0, T...>>().value + ">"; \ ^ ../../include/breep/network/io_manager_base.hpp:158:1: note: in expansion of macro ‘BREEP_DECLARE_TEMPLATE’ BREEP_DECLARE_TEMPLATE(breep::io_manager_base) ^ ../../include/breep/util/type_traits.hpp:66:206: error: parse error in template argument list const std::string universal_name = std::string(#TType"<") + networking_traits_impl<typename std::tuple_element<0, std::tuple<T...>>::type>().universal_name + detail::identifier_from_tuple<detail::remove_type<0, T...>>().value + ">"; \ ^ ../../include/breep/network/io_manager_base.hpp:158:1: note: in expansion of macro ‘BREEP_DECLARE_TEMPLATE’ BREEP_DECLARE_TEMPLATE(breep::io_manager_base) ^ ../../include/breep/util/type_traits.hpp:66:206: error: template argument 1 is invalid const std::string universal_name = std::string(#TType"<") + networking_traits_impl<typename std::tuple_element<0, std::tuple<T...>>::type>().universal_name + detail::identifier_from_tuple<detail::remove_type<0, T...>>().value + ">"; \ ^ ../../include/breep/network/io_manager_base.hpp:158:1: note: in expansion of macro ‘BREEP_DECLARE_TEMPLATE’ BREEP_DECLARE_TEMPLATE(breep::io_manager_base) ^ ../../include/breep/util/type_traits.hpp:66:221: error: expected ‘;’ at end of member declaration const std::string universal_name = std::string(#TType"<") + networking_traits_impl<typename std::tuple_element<0, std::tuple<T...>>::type>().universal_name + detail::identifier_from_tuple<detail::remove_type<0, T...>>().value + ">"; \ ^ ../../include/breep/network/basic_peer_manager.hpp:503:1: note: in expansion of macro ‘BREEP_DECLARE_TEMPLATE’ BREEP_DECLARE_TEMPLATE(breep::basic_peer_manager) ^ ../../include/breep/util/type_traits.hpp:66:221: error: declaration of ‘const string breep::detail::networking_traits_impl<breep::basic_peer_manager<T ...> >::T’ const std::string universal_name = std::string(#TType"<") + networking_traits_impl<typename std::tuple_element<0, std::tuple<T...>>::type>().universal_name + detail::identifier_from_tuple<detail::remove_type<0, T...>>().value + ">"; \ ^ ../../include/breep/network/basic_peer_manager.hpp:503:1: note: in expansion of macro ‘BREEP_DECLARE_TEMPLATE’ BREEP_DECLARE_TEMPLATE(breep::basic_peer_manager) ^ ../../include/breep/util/type_traits.hpp:63:16: error: shadows template parm ‘class ... T’ template <typename... T> \ ^ ../../include/breep/network/basic_peer_manager.hpp:503:1: note: in expansion of macro ‘BREEP_DECLARE_TEMPLATE’ BREEP_DECLARE_TEMPLATE(breep::basic_peer_manager) ^ ../../include/breep/util/type_traits.hpp:66:222: error: expected unqualified-id before ‘...’ token const std::string universal_name = std::string(#TType"<") + networking_traits_impl<typename std::tuple_element<0, std::tuple<T...>>::type>().universal_name + detail::identifier_from_tuple<detail::remove_type<0, T...>>().value + ">"; \ ^ ../../include/breep/network/basic_peer_manager.hpp:503:1: note: in expansion of macro ‘BREEP_DECLARE_TEMPLATE’ BREEP_DECLARE_TEMPLATE(breep::basic_peer_manager) ^ ../../include/breep/util/type_traits.hpp:66:206: error: parse error in template argument list const std::string universal_name = std::string(#TType"<") + networking_traits_impl<typename std::tuple_element<0, std::tuple<T...>>::type>().universal_name + detail::identifier_from_tuple<detail::remove_type<0, T...>>().value + ">"; \ ^ ../../include/breep/network/basic_peer_manager.hpp:503:1: note: in expansion of macro ‘BREEP_DECLARE_TEMPLATE’ BREEP_DECLARE_TEMPLATE(breep::basic_peer_manager) ^ ../../include/breep/util/type_traits.hpp:66:206: error: template argument 1 is invalid const std::string universal_name = std::string(#TType"<") + networking_traits_impl<typename std::tuple_element<0, std::tuple<T...>>::type>().universal_name + detail::identifier_from_tuple<detail::remove_type<0, T...>>().value + ">"; \ ^ ../../include/breep/network/basic_peer_manager.hpp:503:1: note: in expansion of macro ‘BREEP_DECLARE_TEMPLATE’ BREEP_DECLARE_TEMPLATE(breep::basic_peer_manager) ^ ../../include/breep/util/type_traits.hpp:66:221: error: expected ‘;’ at end of member declaration const std::string universal_name = std::string(#TType"<") + networking_traits_impl<typename std::tuple_element<0, std::tuple<T...>>::type>().universal_name + detail::identifier_from_tuple<detail::remove_type<0, T...>>().value + ">"; \ ^ ../../include/breep/network/basic_network.hpp:653:1: note: in expansion of macro ‘BREEP_DECLARE_TEMPLATE’ BREEP_DECLARE_TEMPLATE(breep::basic_network) ^ ../../include/breep/util/type_traits.hpp:66:221: error: declaration of ‘const string breep::detail::networking_traits_impl<breep::basic_network<T ...> >::T’ const std::string universal_name = std::string(#TType"<") + networking_traits_impl<typename std::tuple_element<0, std::tuple<T...>>::type>().universal_name + detail::identifier_from_tuple<detail::remove_type<0, T...>>().value + ">"; \ ^ ../../include/breep/network/basic_network.hpp:653:1: note: in expansion of macro ‘BREEP_DECLARE_TEMPLATE’ BREEP_DECLARE_TEMPLATE(breep::basic_network) ^ ../../include/breep/util/type_traits.hpp:63:16: error: shadows template parm ‘class ... T’ template <typename... T> \ ^ ../../include/breep/network/basic_network.hpp:653:1: note: in expansion of macro ‘BREEP_DECLARE_TEMPLATE’ BREEP_DECLARE_TEMPLATE(breep::basic_network) ^ ../../include/breep/util/type_traits.hpp:66:222: error: expected unqualified-id before ‘...’ token const std::string universal_name = std::string(#TType"<") + networking_traits_impl<typename std::tuple_element<0, std::tuple<T...>>::type>().universal_name + detail::identifier_from_tuple<detail::remove_type<0, T...>>().value + ">"; \ ^ ../../include/breep/network/basic_network.hpp:653:1: note: in expansion of macro ‘BREEP_DECLARE_TEMPLATE’ BREEP_DECLARE_TEMPLATE(breep::basic_network) ^ ../../include/breep/util/type_traits.hpp:66:206: error: parse error in template argument list const std::string universal_name = std::string(#TType"<") + networking_traits_impl<typename std::tuple_element<0, std::tuple<T...>>::type>().universal_name + detail::identifier_from_tuple<detail::remove_type<0, T...>>().value + ">"; \ ^ ../../include/breep/network/basic_network.hpp:653:1: note: in expansion of macro ‘BREEP_DECLARE_TEMPLATE’ BREEP_DECLARE_TEMPLATE(breep::basic_network) ^ ../../include/breep/util/type_traits.hpp:66:206: error: template argument 1 is invalid const std::string universal_name = std::string(#TType"<") + networking_traits_impl<typename std::tuple_element<0, std::tuple<T...>>::type>().universal_name + detail::identifier_from_tuple<detail::remove_type<0, T...>>().value + ">"; \ ^ ../../include/breep/network/basic_network.hpp:653:1: note: in expansion of macro ‘BREEP_DECLARE_TEMPLATE’ BREEP_DECLARE_TEMPLATE(breep::basic_network) ^ ../../include/breep/util/type_traits.hpp:66:221: error: expected ‘;’ at end of member declaration const std::string universal_name = std::string(#TType"<") + networking_traits_impl<typename std::tuple_element<0, std::tuple<T...>>::type>().universal_name + detail::identifier_from_tuple<detail::remove_type<0, T...>>().value + ">"; \ ^ main.cpp:88:1: note: in expansion of macro ‘BREEP_DECLARE_TEMPLATE’ BREEP_DECLARE_TEMPLATE(chat_message) ^ ../../include/breep/util/type_traits.hpp:66:221: error: declaration of ‘const string breep::detail::networking_traits_impl<chat_message<T ...> >::T’ const std::string universal_name = std::string(#TType"<") + networking_traits_impl<typename std::tuple_element<0, std::tuple<T...>>::type>().universal_name + detail::identifier_from_tuple<detail::remove_type<0, T...>>().value + ">"; \ ^ main.cpp:88:1: note: in expansion of macro ‘BREEP_DECLARE_TEMPLATE’ BREEP_DECLARE_TEMPLATE(chat_message) ^ ../../include/breep/util/type_traits.hpp:63:16: error: shadows template parm ‘class ... T’ template <typename... T> \ ^ main.cpp:88:1: note: in expansion of macro ‘BREEP_DECLARE_TEMPLATE’ BREEP_DECLARE_TEMPLATE(chat_message) ^ ../../include/breep/util/type_traits.hpp:66:222: error: expected unqualified-id before ‘...’ token const std::string universal_name = std::string(#TType"<") + networking_traits_impl<typename std::tuple_element<0, std::tuple<T...>>::type>().universal_name + detail::identifier_from_tuple<detail::remove_type<0, T...>>().value + ">"; \ ^ main.cpp:88:1: note: in expansion of macro ‘BREEP_DECLARE_TEMPLATE’ BREEP_DECLARE_TEMPLATE(chat_message) ^ ../../include/breep/util/type_traits.hpp:66:206: error: parse error in template argument list const std::string universal_name = std::string(#TType"<") + networking_traits_impl<typename std::tuple_element<0, std::tuple<T...>>::type>().universal_name + detail::identifier_from_tuple<detail::remove_type<0, T...>>().value + ">"; \ ^ main.cpp:88:1: note: in expansion of macro ‘BREEP_DECLARE_TEMPLATE’ BREEP_DECLARE_TEMPLATE(chat_message) ^ ../../include/breep/util/type_traits.hpp:66:206: error: template argument 1 is invalid const std::string universal_name = std::string(#TType"<") + networking_traits_impl<typename std::tuple_element<0, std::tuple<T...>>::type>().universal_name + detail::identifier_from_tuple<detail::remove_type<0, T...>>().value + ">"; \ ^ main.cpp:88:1: note: in expansion of macro ‘BREEP_DECLARE_TEMPLATE’ BREEP_DECLARE_TEMPLATE(chat_message) ^ Makefile:224: die Regel für Ziel „build/main.o“ scheiterte make[1]: *** [build/main.o] Fehler 1 Makefile:161: die Regel für Ziel „all“ scheiterte make: *** [all] Fehler 2

The dependancies are installed. Do I need a special compiler version?

Errors when building with Visual Studio IDE

I get the following errors during compilation ( Microsoft Visual Studio Ultimate 2013):
error C2144: syntax error : 'bool' should be preceded by ';'
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
etc.
all in type_traits.hpp.
Unfortunately I do not have any experience using GCC.
It will be much appreciated if you could help.

Add bytes hook on basic_network

Adding hooks after serializing objects and before deserializing them could be useful in some circumstances (encryption & decryption, compression & decompression, …)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.