/*
- * 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.
throw err_.value();
}
}
+
void close() {
sock_->close();
}
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_;