diff options
author | lloyd <[email protected]> | 2012-01-26 21:11:52 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2012-01-26 21:11:52 +0000 |
commit | cb8c64be095a0ef75beb621e8d669096efd7b8ae (patch) | |
tree | 5b1c20935afb94f6b02c238295c19373ac8f0e52 /doc/examples/tls_client.cpp | |
parent | 4b8786ad157e38b4143b0968c1ea1c83c2ee7388 (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.cpp | 6 |
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; } |