/*
- * Copyright 2017 Facebook, Inc.
+ * Copyright 2014-present Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include <folly/io/async/AsyncUDPSocket.h>
-#include <folly/io/async/EventBase.h>
#include <folly/Likely.h>
+#include <folly/io/async/EventBase.h>
#include <folly/portability/Fcntl.h>
#include <folly/portability/Sockets.h>
#include <folly/portability/Unistd.h>
AsyncUDPSocket::AsyncUDPSocket(EventBase* evb)
: EventHandler(CHECK_NOTNULL(evb)),
+ readCallback_(nullptr),
eventBase_(evb),
- fd_(-1),
- readCallback_(nullptr) {
+ fd_(-1) {
evb->dcheckIsInEventBaseThread();
}
msg.msg_controllen = 0;
msg.msg_flags = 0;
- return ::sendmsg(fd_, &msg, 0);
+ return sendmsg(fd_, &msg, 0);
}
void AsyncUDPSocket::resumeRead(ReadCallback* cob) {
return registerHandler(uint16_t(flags | PERSIST));
}
-} // Namespace
+} // namespace folly