CHECK(!socket_);
socket_ = folly::make_unique<AsyncUDPSocket>(evb_);
+ socket_->setReusePort(reusePort_);
socket_->bind(addy);
}
+ void setReusePort(bool reusePort) {
+ reusePort_ = reusePort;
+ }
+
folly::SocketAddress address() const {
CHECK(socket_);
return socket_->address();
// Temporary buffer for data
folly::IOBufQueue buf_;
+
+ bool reusePort_{false};
};
} // Namespace