#include <folly/portability/Sockets.h>
#include <boost/scoped_array.hpp>
+#include <memory>
enum StateEnum {
STATE_WAITING,
std::shared_ptr<BlockingSocket> accept(int timeout=50) {
int fd = acceptFD(timeout);
- return std::shared_ptr<BlockingSocket>(new BlockingSocket(fd));
+ return std::make_shared<BlockingSocket>(fd);
}
std::shared_ptr<folly::AsyncSocket> acceptAsync(folly::EventBase* evb,