Set option via address.
This commit is contained in:
parent
11f1eaf2c3
commit
fe1538e8ae
|
|
@ -192,9 +192,8 @@ public:
|
||||||
* Constructor
|
* Constructor
|
||||||
* @param handler User implemented handler object
|
* @param handler User implemented handler object
|
||||||
* @param hostname The address to connect to
|
* @param hostname The address to connect to
|
||||||
* @param random Randomly select one of the IP addresses that belong to the hostname
|
|
||||||
*/
|
*/
|
||||||
TcpConnection(TcpHandler *handler, const Address &address, bool random = false);
|
TcpConnection(TcpHandler *handler, const Address &address);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* No copying
|
* No copying
|
||||||
|
|
|
||||||
|
|
@ -23,11 +23,10 @@ namespace AMQP {
|
||||||
* Constructor
|
* Constructor
|
||||||
* @param handler User implemented handler object
|
* @param handler User implemented handler object
|
||||||
* @param hostname The address to connect to
|
* @param hostname The address to connect to
|
||||||
* @param random Randomly select one of the IP addresses that belong to the hostname
|
|
||||||
*/
|
*/
|
||||||
TcpConnection::TcpConnection(TcpHandler *handler, const Address &address, bool random) :
|
TcpConnection::TcpConnection(TcpHandler *handler, const Address &address) :
|
||||||
_handler(handler),
|
_handler(handler),
|
||||||
_state(new TcpResolver(this, address.hostname(), address.port(), address.secure(), address.option("connectTimeout", 5), random)),
|
_state(new TcpResolver(this, address.hostname(), address.port(), address.secure(), address.option("connectTimeout", 5), address.option("randomConnect", false))),
|
||||||
_connection(this, address.login(), address.vhost())
|
_connection(this, address.login(), address.vhost())
|
||||||
{
|
{
|
||||||
// tell the handler
|
// tell the handler
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue