Fix copyright lines
[folly.git] / folly / io / async / test / BlockingSocket.h
index b3713fc241bdfe55ec484a64acce1608934f0603..6e8505eaf5cae53d8c89a41030aba5271add5172 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2015-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.
@@ -56,6 +56,7 @@ class BlockingSocket : public folly::AsyncSocket::ConnectCallback,
       throw err_.value();
     }
   }
+
   void close() {
     sock_->close();
   }
@@ -86,6 +87,14 @@ class BlockingSocket : public folly::AsyncSocket::ConnectCallback,
     return sock_->getFd();
   }
 
+  folly::AsyncSocket* getSocket() {
+    return sock_.get();
+  }
+
+  folly::AsyncSSLSocket* getSSLSocket() {
+    return dynamic_cast<folly::AsyncSSLSocket*>(sock_.get());
+  }
+
  private:
   folly::EventBase eventBase_;
   folly::AsyncSocket::UniquePtr sock_;