Commit 1252eb25 authored by Orvid King's avatar Orvid King Committed by Facebook Github Bot

AsyncSocket.detachFd to AsyncSocket.detachNetworkSocket

Reviewed By: yfeldblum

Differential Revision: D13603520

fbshipit-source-id: 08365b3723c024697a546223683e774f18b61a94
parent a4c0fd99
......@@ -333,7 +333,7 @@ AsyncSocket::AsyncSocket(
AsyncSocket::AsyncSocket(AsyncSocket::UniquePtr oldAsyncSocket)
: AsyncSocket(
oldAsyncSocket->getEventBase(),
oldAsyncSocket->detachFd(),
oldAsyncSocket->detachNetworkSocket().toFd(),
oldAsyncSocket->getZeroCopyBufId()) {
preReceivedData_ = std::move(oldAsyncSocket->preReceivedData_);
}
......
......@@ -361,7 +361,7 @@ class AsyncSocket : virtual public AsyncTransportWrapper {
* Returns the file descriptor. The caller assumes ownership of the
* descriptor, and it will not be closed when the AsyncSocket is destroyed.
*/
virtual int detachFd() {
virtual int detachFd(int) {
return detachNetworkSocket().toFd();
}
......
......@@ -47,7 +47,7 @@ class MockAsyncSocket : public AsyncSocket {
}
MOCK_CONST_METHOD1(getPeerAddress, void(folly::SocketAddress*));
MOCK_METHOD0(detachFd, int());
MOCK_METHOD0(detachNetworkSocket, NetworkSocket());
MOCK_CONST_METHOD0(getNetworkSocket, NetworkSocket());
MOCK_METHOD0(closeNow, void());
MOCK_CONST_METHOD0(good, bool());
......
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