Skip to content

Commit f36e2e4

Browse files
authored
Add the isSSLConnection() method (#61)
1 parent 374acaa commit f36e2e4

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

trantor/net/TcpConnection.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,11 @@ class TcpConnection
9494
virtual size_t bytesSent() const = 0;
9595
virtual size_t bytesReceived() const = 0;
9696

97+
virtual bool isSSLConnection() const
98+
{
99+
return false;
100+
}
101+
97102
private:
98103
std::shared_ptr<void> contextPtr_;
99104
};

trantor/net/ssl/SSLConnection.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ class SSLConnection : public TcpConnectionImpl
5050
virtual ~SSLConnection()
5151
{
5252
}
53+
virtual bool isSSLConnection() const override
54+
{
55+
return true;
56+
}
5357

5458
private:
5559
void doHandshaking();

0 commit comments

Comments
 (0)