Added a method to check how many channels a connection has

This commit is contained in:
Toon Schoenmakers 2015-09-10 14:33:25 +02:00
parent 6f230ebf4a
commit 12af6e854a
3 changed files with 20 additions and 0 deletions

2
.gitignore vendored
View File

@ -5,9 +5,11 @@
# Compiled Dynamic libraries
*.so
*.so.*
*.dylib
# Compiled Static libraries
*.lai
*.la
*.a
*.a.*

View File

@ -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
*/

View File

@ -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
*/