Merge commit '64f2f2734ad853784bdd260bcf31e065c47c0741' into fix-configure-pthread...
[folly.git] / folly / io / async / AsyncServerSocket.h
index 72c14a79cecee8dc32c6bdbcc3dbf5c7fb821964..a932f4e4d1ad43f9a98a6685cf814ac42c969721 100644 (file)
@@ -255,6 +255,17 @@ class AsyncServerSocket : public DelayedDestruction {
    */
   virtual void bind(const SocketAddress& address);
 
+  /**
+   * Bind to the specified port for the specified addresses.
+   *
+   * This must be called from the primary EventBase thread.
+   *
+   * Throws TTransportException on error.
+   */
+  virtual void bind(
+      const std::vector<IPAddress>& ipAddresses,
+      uint16_t port);
+
   /**
    * Bind to the specified port.
    *
@@ -639,6 +650,7 @@ class AsyncServerSocket : public DelayedDestruction {
 
   int createSocket(int family);
   void setupSocket(int fd);
+  void bindSocket(int fd, const SocketAddress& address, bool isExistingSocket);
   void dispatchSocket(int socket, SocketAddress&& address);
   void dispatchError(const char *msg, int errnoValue);
   void enterBackoff();