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

Shift from the file descriptor overload of EventHandler to the NetworkSocket overload

Summary: The file descriptor overload will be going away.

Reviewed By: yfeldblum

Differential Revision: D14070240

fbshipit-source-id: 20a0248fd9840629e31a3274032b889b6bb5f8de
parent 88c2fecb
...@@ -45,7 +45,8 @@ class AsyncPipeReader : public EventHandler, ...@@ -45,7 +45,8 @@ class AsyncPipeReader : public EventHandler,
} }
AsyncPipeReader(folly::EventBase* eventBase, int pipeFd) AsyncPipeReader(folly::EventBase* eventBase, int pipeFd)
: EventHandler(eventBase, pipeFd), fd_(pipeFd) {} : EventHandler(eventBase, folly::NetworkSocket::fromFd(pipeFd)),
fd_(pipeFd) {}
/** /**
* Set the read callback and automatically install/uninstall the handler * Set the read callback and automatically install/uninstall the handler
...@@ -106,7 +107,8 @@ class AsyncPipeWriter : public EventHandler, ...@@ -106,7 +107,8 @@ class AsyncPipeWriter : public EventHandler,
} }
AsyncPipeWriter(folly::EventBase* eventBase, int pipeFd) AsyncPipeWriter(folly::EventBase* eventBase, int pipeFd)
: EventHandler(eventBase, pipeFd), fd_(pipeFd) {} : EventHandler(eventBase, folly::NetworkSocket::fromFd(pipeFd)),
fd_(pipeFd) {}
/** /**
* Asynchronously write the given iobuf to this pipe, and invoke the callback * Asynchronously write the given iobuf to this pipe, and invoke the callback
......
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