added Channel::ready() method

This commit is contained in:
Emiel Bruijntjes 2020-04-18 08:30:44 +02:00
parent da26b1112e
commit 79fe85cc0b
2 changed files with 18 additions and 0 deletions

View File

@ -124,6 +124,15 @@ public:
return _implementation->resume();
}
/**
* Is the channel ready / has it passed the initial handshake?
* @return bool
*/
bool ready() const
{
return _implementation->ready();
}
/**
* Is the channel usable / not yet closed?
* @return bool

View File

@ -260,6 +260,15 @@ public:
return _state == state_connected || _state == state_ready;
}
/**
* Is the channel ready / has it passed the initial handshake?
* @return bool
*/
bool ready() const
{
return _state == state_ready;
}
/**
* Put channel in a confirm mode (RabbitMQ specific)
*/