diff --git a/.gitignore b/.gitignore index 620d3dc..4a62ba7 100644 --- a/.gitignore +++ b/.gitignore @@ -5,9 +5,11 @@ # Compiled Dynamic libraries *.so +*.so.* *.dylib # Compiled Static libraries *.lai *.la *.a +*.a.* diff --git a/include/connection.h b/include/connection.h index 599ff01..64e63e1 100644 --- a/include/connection.h +++ b/include/connection.h @@ -144,6 +144,15 @@ public: return _implementation.close(); } + /** + * Retrieve the amount of channels this connection has + * @return std::size_t + */ + std::size_t channels() const + { + return _implementation.channels(); + } + /** * Some classes have access to private properties */ diff --git a/include/connectionimpl.h b/include/connectionimpl.h index ccd1509..ced61dd 100644 --- a/include/connectionimpl.h +++ b/include/connectionimpl.h @@ -333,6 +333,15 @@ public: _handler->onClosed(_parent); } + /** + * Retrieve the amount of channels this connection has + * @return std::size_t + */ + std::size_t channels() const + { + return _channels.size(); + } + /** * The actual connection is a friend and can construct this class */