AsyncUDPSocket::AsyncUDPSocket(EventBase* evb)
: EventHandler(CHECK_NOTNULL(evb)),
+ readCallback_(nullptr),
eventBase_(evb),
- fd_(-1),
- readCallback_(nullptr) {
+ fd_(-1) {
evb->dcheckIsInEventBaseThread();
}
return ::sendmsg(socket, message, flags);
}
+ // Non-null only when we are reading
+ ReadCallback* readCallback_;
+
private:
AsyncUDPSocket(const AsyncUDPSocket&) = delete;
AsyncUDPSocket& operator=(const AsyncUDPSocket&) = delete;
// Temp space to receive client address
folly::SocketAddress clientAddress_;
- // Non-null only when we are reading
- ReadCallback* readCallback_;
-
bool reuseAddr_{true};
bool reusePort_{false};
};