Commit 51991ebe authored by Neel Goyal's avatar Neel Goyal Committed by Facebook Github Bot

Mark getApplicationProtocol() const

Summary: getApplicationProtocol should probably be const.

Reviewed By: knekritz, mingtaoy

Differential Revision: D9772305

fbshipit-source-id: c648f9307214258639616e2f4ff3a90dfbf9484b
parent 2c7607f0
...@@ -396,7 +396,7 @@ bool AsyncSSLSocket::connecting() const { ...@@ -396,7 +396,7 @@ bool AsyncSSLSocket::connecting() const {
(sslState_ == STATE_UNINIT || sslState_ == STATE_CONNECTING)))); (sslState_ == STATE_UNINIT || sslState_ == STATE_CONNECTING))));
} }
std::string AsyncSSLSocket::getApplicationProtocol() noexcept { std::string AsyncSSLSocket::getApplicationProtocol() const noexcept {
const unsigned char* protoName = nullptr; const unsigned char* protoName = nullptr;
unsigned protoLength; unsigned protoLength;
if (getSelectedNextProtocolNoThrow(&protoName, &protoLength)) { if (getSelectedNextProtocolNoThrow(&protoName, &protoLength)) {
......
...@@ -322,7 +322,7 @@ class AsyncSSLSocket : public virtual AsyncSocket { ...@@ -322,7 +322,7 @@ class AsyncSSLSocket : public virtual AsyncSocket {
void shutdownWriteNow() override; void shutdownWriteNow() override;
bool good() const override; bool good() const override;
bool connecting() const override; bool connecting() const override;
std::string getApplicationProtocol() noexcept override; std::string getApplicationProtocol() const noexcept override;
std::string getSecurityProtocol() const override { std::string getSecurityProtocol() const override {
if (sslState_ == STATE_UNENCRYPTED) { if (sslState_ == STATE_UNENCRYPTED) {
......
...@@ -411,7 +411,7 @@ class AsyncTransport : public DelayedDestruction, public AsyncSocketBase { ...@@ -411,7 +411,7 @@ class AsyncTransport : public DelayedDestruction, public AsyncSocketBase {
* protocol. This is useful for transports which are used to tunnel other * protocol. This is useful for transports which are used to tunnel other
* protocols. * protocols.
*/ */
virtual std::string getApplicationProtocol() noexcept { virtual std::string getApplicationProtocol() const noexcept {
return ""; return "";
} }
......
...@@ -172,7 +172,7 @@ class DecoratedAsyncTransportWrapper : public folly::AsyncTransportWrapper { ...@@ -172,7 +172,7 @@ class DecoratedAsyncTransportWrapper : public folly::AsyncTransportWrapper {
transport_->shutdownWriteNow(); transport_->shutdownWriteNow();
} }
std::string getApplicationProtocol() noexcept override { std::string getApplicationProtocol() const noexcept override {
return transport_->getApplicationProtocol(); return transport_->getApplicationProtocol();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment