FairMQChannel: API to access socket metrics; make fSocket private.

This commit is contained in:
Alexey Rybalchenko
2017-03-07 10:52:27 +01:00
committed by Mohammad Al-Turany
parent 2a72d58766
commit 2293c5e417
5 changed files with 48 additions and 14 deletions

View File

@@ -117,6 +117,12 @@ FairMQChannel& FairMQChannel::operator=(const FairMQChannel& chan)
return *this;
}
FairMQSocket const & FairMQChannel::GetSocket() const
{
assert(fSocket);
return *fSocket;
}
string FairMQChannel::GetChannelName() const
{
return fName;
@@ -758,6 +764,27 @@ void FairMQChannel::Tokenize(vector<string>& output, const string& input, const
boost::algorithm::split(output, input, boost::algorithm::is_any_of(delimiters));
}
unsigned long FairMQChannel::GetBytesTx() const
{
return fSocket->GetBytesTx();
}
unsigned long FairMQChannel::GetBytesRx() const
{
return fSocket->GetBytesRx();
}
unsigned long FairMQChannel::GetMessagesTx() const
{
return fSocket->GetMessagesTx();
}
unsigned long FairMQChannel::GetMessagesRx() const
{
return fSocket->GetMessagesRx();
}
FairMQTransportFactory* FairMQChannel::Transport()
{
return fTransportFactory.get();