Fix copyright lines
[folly.git] / folly / io / async / AsyncServerSocket.h
index 1d53bccc784b7482558f837260427b7bae456bbf..e4eecf0aaa86d6edc0cf87710d102ae536fb76db 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.
@@ -227,7 +227,7 @@ class AsyncServerSocket : public DelayedDestruction
                                                  Destructor());
   }
 
-  void setShutdownSocketSet(ShutdownSocketSet* newSS);
+  void setShutdownSocketSet(const std::weak_ptr<ShutdownSocketSet>& wNewSS);
 
   /**
    * Destroy the socket.
@@ -319,6 +319,11 @@ class AsyncServerSocket : public DelayedDestruction
     }
   }
 
+  /* enable zerocopy support for the server sockets - the s = accept sockets
+   * inherit it
+   */
+  bool setZeroCopy(bool enable);
+
   /**
    * Bind to the specified address.
    *
@@ -746,7 +751,7 @@ class AsyncServerSocket : public DelayedDestruction
    */
   class RemoteAcceptor
       : private NotificationQueue<QueueMessage>::Consumer {
-  public:
+   public:
     explicit RemoteAcceptor(AcceptCallback *callback,
                             ConnectionEventCallback *connectionEventCallback)
       : callback_(callback),
@@ -763,7 +768,7 @@ class AsyncServerSocket : public DelayedDestruction
       return &queue_;
     }
 
-  private:
+   private:
     AcceptCallback *callback_;
     ConnectionEventCallback* connectionEventCallback_;
 
@@ -872,8 +877,8 @@ class AsyncServerSocket : public DelayedDestruction
   bool tfo_{false};
   bool noTransparentTls_{false};
   uint32_t tfoMaxQueueSize_{0};
-  ShutdownSocketSet* shutdownSocketSet_;
+  std::weak_ptr<ShutdownSocketSet> wShutdownSocketSet_;
   ConnectionEventCallback* connectionEventCallback_{nullptr};
 };
 
-} // folly
+} // namespace folly