Udp Acceptor
[folly.git] / folly / wangle / acceptor / Acceptor.h
index 7d7269c502156bbb343c92df98a05450820039c1..c82f97a6755f09f0933ee7180a54a055918724dc 100644 (file)
@@ -20,6 +20,7 @@
 #include <event.h>
 #include <folly/io/async/AsyncSSLSocket.h>
 #include <folly/io/async/AsyncServerSocket.h>
+#include <folly/io/async/AsyncUDPServerSocket.h>
 
 namespace folly { namespace wangle {
 class ManagedConnection;
@@ -46,7 +47,8 @@ class SSLContextManager;
  */
 class Acceptor :
   public folly::AsyncServerSocket::AcceptCallback,
-  public folly::wangle::ConnectionManager::Callback {
+  public folly::wangle::ConnectionManager::Callback,
+  public AsyncUDPServerSocket::Callback  {
  public:
 
   enum class State : uint32_t {
@@ -229,6 +231,10 @@ class Acceptor :
       const std::string& nextProtocolName,
       const TransportInfo& tinfo) = 0;
 
+  void onListenStarted() noexcept {}
+  void onListenStopped() noexcept {}
+  void onDataAvailable(const SocketAddress&, std::unique_ptr<IOBuf>, bool) noexcept {}
+
   virtual AsyncSocket::UniquePtr makeNewAsyncSocket(EventBase* base, int fd) {
     return AsyncSocket::UniquePtr(new AsyncSocket(base, fd));
   }