/*
- * Copyright 2014 Facebook, Inc.
+ * Copyright 2015 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
: eventBase_(nullptr)
, writeTimeout_(this, nullptr)
, ioHandler_(this, nullptr) {
- VLOG(5) << "new AsyncSocket(" << ")";
+ VLOG(5) << "new AsyncSocket()";
init();
}
AsyncSocket::AsyncSocket(EventBase* evb,
const folly::SocketAddress& address,
uint32_t connectTimeout)
- : eventBase_(evb)
- , writeTimeout_(this, evb)
- , ioHandler_(this, evb) {
- VLOG(5) << "new AsyncSocket(" << this << ", evb=" << evb << ")";
- init();
+ : AsyncSocket(evb) {
connect(nullptr, address, connectTimeout);
}
const std::string& ip,
uint16_t port,
uint32_t connectTimeout)
- : eventBase_(evb)
- , writeTimeout_(this, evb)
- , ioHandler_(this, evb) {
- VLOG(5) << "new AsyncSocket(" << this << ", evb=" << evb << ")";
- init();
+ : AsyncSocket(evb) {
connect(nullptr, ip, port, connectTimeout);
}