Commit 432d60d6 authored by Neel Goyal's avatar Neel Goyal Committed by Facebook Github Bot

Change AsyncUDP's readCallback to be protected.

Summary: Change AsyncUDPSocket's ReadCallback to be protected so that subclasses can have access to it.

Reviewed By: yangchi

Differential Revision: D5376012

fbshipit-source-id: 7ec21d9bfe6bde525253adea7abf5dea15fb7fa0
parent 6a3a9eb0
......@@ -36,9 +36,9 @@ namespace folly {
AsyncUDPSocket::AsyncUDPSocket(EventBase* evb)
: EventHandler(CHECK_NOTNULL(evb)),
readCallback_(nullptr),
eventBase_(evb),
fd_(-1),
readCallback_(nullptr) {
fd_(-1) {
evb->dcheckIsInEventBaseThread();
}
......
......@@ -167,6 +167,9 @@ class AsyncUDPSocket : public EventHandler {
return ::sendmsg(socket, message, flags);
}
// Non-null only when we are reading
ReadCallback* readCallback_;
private:
AsyncUDPSocket(const AsyncUDPSocket&) = delete;
AsyncUDPSocket& operator=(const AsyncUDPSocket&) = delete;
......@@ -186,9 +189,6 @@ class AsyncUDPSocket : public EventHandler {
// Temp space to receive client address
folly::SocketAddress clientAddress_;
// Non-null only when we are reading
ReadCallback* readCallback_;
bool reuseAddr_{true};
bool reusePort_{false};
};
......
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