diff options
Diffstat (limited to 'src/tls/tls_channel.h')
-rw-r--r-- | src/tls/tls_channel.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/tls/tls_channel.h b/src/tls/tls_channel.h index 53af0bdfc..05fb7e82f 100644 --- a/src/tls/tls_channel.h +++ b/src/tls/tls_channel.h @@ -58,6 +58,18 @@ class BOTAN_DLL Channel virtual void renegotiate() = 0; /** + * Attempt to send a heartbeat message (if negotiated with counterparty) + * @param payload will be echoed back + * @param countents_size size of payload in bytes + */ + void heartbeat(const byte payload[], size_t payload_size); + + /** + * Attempt to send a heartbeat message (if negotiated with counterparty) + */ + void heartbeat() { heartbeat(0, 0); } + + /** * @return certificate chain of the peer (may be empty) */ std::vector<X509_Certificate> peer_cert_chain() const { return peer_certs; } @@ -130,6 +142,8 @@ class BOTAN_DLL Channel bool handshake_completed; bool connection_closed; + bool m_peer_supports_heartbeats; + bool m_heartbeat_sending_allowed; }; } |