removed more tabs
This commit is contained in:
parent
69596e49dc
commit
5b8841c937
|
|
@ -67,9 +67,12 @@ public:
|
||||||
const char *last = data + size;
|
const char *last = data + size;
|
||||||
|
|
||||||
// must start with ampqs:// to have a secure connection (and we also assign a different default port)
|
// must start with ampqs:// to have a secure connection (and we also assign a different default port)
|
||||||
if ((_secure = strncmp(data, "amqps://", 8) == 0)) _port = 5671;
|
_secure = strncmp(data, "amqps://", 8) == 0;
|
||||||
|
|
||||||
// otherwise protocol must be amqp://
|
// default port changes for secure connections
|
||||||
|
if (_secure) _port = 5671;
|
||||||
|
|
||||||
|
// otherwise protocol must be amqp://
|
||||||
else if (strncmp(data, "amqp://", 7) != 0) throw std::runtime_error("AMQP address should start with \"amqp://\" or \"amqps://\"");
|
else if (strncmp(data, "amqp://", 7) != 0) throw std::runtime_error("AMQP address should start with \"amqp://\" or \"amqps://\"");
|
||||||
|
|
||||||
// begin of the string was parsed
|
// begin of the string was parsed
|
||||||
|
|
@ -142,7 +145,7 @@ public:
|
||||||
* @param port
|
* @param port
|
||||||
* @param login
|
* @param login
|
||||||
* @param vhost
|
* @param vhost
|
||||||
* @param secure
|
* @param secure
|
||||||
*/
|
*/
|
||||||
Address(std::string host, uint16_t port, Login login, std::string vhost, bool secure = false) :
|
Address(std::string host, uint16_t port, Login login, std::string vhost, bool secure = false) :
|
||||||
_secure(secure),
|
_secure(secure),
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@
|
||||||
|
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
#pragma comment(lib,"Ws2_32.lib")
|
#pragma comment(lib,"Ws2_32.lib")
|
||||||
//# include <sys/param.h>
|
//# include <sys/param.h>
|
||||||
|
|
||||||
#if BYTE_ORDER == LITTLE_ENDIAN
|
#if BYTE_ORDER == LITTLE_ENDIAN
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -176,7 +176,7 @@ protected:
|
||||||
TcpConnection *const connection,
|
TcpConnection *const connection,
|
||||||
const int fd)
|
const int fd)
|
||||||
{
|
{
|
||||||
// Resolve any potential problems with dangling pointers
|
// Resolve any potential problems with dangling pointers
|
||||||
// (remember we are using async).
|
// (remember we are using async).
|
||||||
const std::shared_ptr<Watcher> apWatcher = awpWatcher.lock();
|
const std::shared_ptr<Watcher> apWatcher = awpWatcher.lock();
|
||||||
if (!apWatcher) { return; }
|
if (!apWatcher) { return; }
|
||||||
|
|
@ -210,7 +210,7 @@ protected:
|
||||||
TcpConnection *const connection,
|
TcpConnection *const connection,
|
||||||
const int fd)
|
const int fd)
|
||||||
{
|
{
|
||||||
// Resolve any potential problems with dangling pointers
|
// Resolve any potential problems with dangling pointers
|
||||||
// (remember we are using async).
|
// (remember we are using async).
|
||||||
const std::shared_ptr<Watcher> apWatcher = awpWatcher.lock();
|
const std::shared_ptr<Watcher> apWatcher = awpWatcher.lock();
|
||||||
if (!apWatcher) { return; }
|
if (!apWatcher) { return; }
|
||||||
|
|
@ -498,7 +498,7 @@ protected:
|
||||||
|
|
||||||
// construct a new pair (watcher/timer), and put it in the map
|
// construct a new pair (watcher/timer), and put it in the map
|
||||||
const std::shared_ptr<Watcher> apWatcher =
|
const std::shared_ptr<Watcher> apWatcher =
|
||||||
std::make_shared<Watcher>(_ioservice, _strand, fd);
|
std::make_shared<Watcher>(_ioservice, _strand, fd);
|
||||||
|
|
||||||
_watchers[fd] = apWatcher;
|
_watchers[fd] = apWatcher;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue