|
|
|
@@ -69,26 +69,28 @@ void connection::tcp_connect(const std::string& hostname, uint port) |
|
|
|
} |
|
|
|
|
|
|
|
void connection::login_plain( |
|
|
|
const std::string& username, |
|
|
|
const std::string& password, |
|
|
|
const std::string& vhost, |
|
|
|
int maxChannels, |
|
|
|
int maxFrameSize) |
|
|
|
const std::string& p_username, |
|
|
|
const std::string& p_password, |
|
|
|
const std::string& p_vhost, |
|
|
|
int p_heartbeat, |
|
|
|
int p_max_channels, |
|
|
|
int p_max_frame_size) |
|
|
|
{ |
|
|
|
__impl::check_and_raise( |
|
|
|
amqp_login(handle(), vhost.c_str(), maxChannels, maxFrameSize, 0, AMQP_SASL_METHOD_PLAIN, username.c_str(), password.c_str()), |
|
|
|
amqp_login(handle(), p_vhost.c_str(), p_max_channels, p_max_frame_size, p_heartbeat, AMQP_SASL_METHOD_PLAIN, p_username.c_str(), p_password.c_str()), |
|
|
|
"error while login plain", |
|
|
|
false); |
|
|
|
} |
|
|
|
|
|
|
|
void connection::login_external( |
|
|
|
const std::string& identify, |
|
|
|
const std::string& vhost, |
|
|
|
int maxChannels, |
|
|
|
int maxFrameSize) |
|
|
|
const std::string& p_identify, |
|
|
|
const std::string& p_vhost, |
|
|
|
int p_heartbeat, |
|
|
|
int p_max_channels, |
|
|
|
int p_max_frame_size) |
|
|
|
{ |
|
|
|
__impl::check_and_raise( |
|
|
|
amqp_login(handle(), vhost.c_str(), maxChannels, maxFrameSize, 0, AMQP_SASL_METHOD_EXTERNAL, identify.c_str()), |
|
|
|
amqp_login(handle(), p_vhost.c_str(), p_max_channels, p_max_frame_size, p_heartbeat, AMQP_SASL_METHOD_EXTERNAL, p_identify.c_str()), |
|
|
|
"error while login external", |
|
|
|
false); |
|
|
|
} |
|
|
|
|