Commit b1ab506c authored by Alan Frindell's avatar Alan Frindell Committed by Facebook GitHub Bot

Add AsyncSocket::UniquePtr ctor coro::Socket

Summary: This diff is part of a series cleaning up coro::Socket

Reviewed By: yairgott

Differential Revision: D26837067

fbshipit-source-id: e7ef587a6f859a167404b3eb2c8399544aa1d092
parent 696d65f7
...@@ -74,6 +74,9 @@ class Socket : public Transport { ...@@ -74,6 +74,9 @@ class Socket : public Transport {
explicit Socket(std::shared_ptr<AsyncSocket> socket) explicit Socket(std::shared_ptr<AsyncSocket> socket)
: socket_(std::move(socket)) {} : socket_(std::move(socket)) {}
explicit Socket(AsyncSocket::UniquePtr socket)
: socket_(socket.release(), AsyncSocket::Destructor()) {}
Socket(Socket&&) = default; Socket(Socket&&) = default;
Socket& operator=(Socket&&) = default; Socket& operator=(Socket&&) = default;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment