aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples/tls_client.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-01-26 21:11:52 +0000
committerlloyd <[email protected]>2012-01-26 21:11:52 +0000
commitcb8c64be095a0ef75beb621e8d669096efd7b8ae (patch)
tree5b1c20935afb94f6b02c238295c19373ac8f0e52 /doc/examples/tls_client.cpp
parent4b8786ad157e38b4143b0968c1ea1c83c2ee7388 (diff)
Change callback interface to pass the Alert object itself instead
of just the type code. Implement Alert::type_string
Diffstat (limited to 'doc/examples/tls_client.cpp')
-rw-r--r--doc/examples/tls_client.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/examples/tls_client.cpp b/doc/examples/tls_client.cpp
index 80947af62..1cca002af 100644
--- a/doc/examples/tls_client.cpp
+++ b/doc/examples/tls_client.cpp
@@ -90,11 +90,11 @@ void socket_write(int sockfd, const byte buf[], size_t length)
bool got_alert = false;
-void process_data(const byte buf[], size_t buf_size, u16bit alert_info)
+void process_data(const byte buf[], size_t buf_size, TLS::Alert alert)
{
- if(alert_info != TLS::NULL_ALERT)
+ if(alert.is_valid())
{
- std::cout << "Alert: " << alert_info << "\n";
+ std::cout << "Alert: " << alert.type_string() << "\n";
got_alert = true;
}