Fix copyright lines
[folly.git] / folly / io / async / AsyncUDPSocket.h
index d327c1d68787a5e4382964f23a550da03b2d39f7..0f390384f97b7932639e858a97231d2d07ceb4d7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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.
@@ -158,6 +158,18 @@ class AsyncUDPSocket : public EventHandler {
     reuseAddr_ = reuseAddr;
   }
 
+  EventBase* getEventBase() const {
+    return eventBase_;
+  }
+
+ protected:
+  virtual ssize_t sendmsg(int socket, const struct msghdr* message, int flags) {
+    return ::sendmsg(socket, message, flags);
+  }
+
+  // Non-null only when we are reading
+  ReadCallback* readCallback_;
+
  private:
   AsyncUDPSocket(const AsyncUDPSocket&) = delete;
   AsyncUDPSocket& operator=(const AsyncUDPSocket&) = delete;
@@ -177,11 +189,8 @@ 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};
 };
 
-} // Namespace
+} // namespace folly