aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/tls.txt8
-rw-r--r--src/tls/tls_channel.cpp6
-rw-r--r--src/tls/tls_channel.h2
3 files changed, 8 insertions, 8 deletions
diff --git a/doc/tls.txt b/doc/tls.txt
index b25c402bd..8c2b815b6 100644
--- a/doc/tls.txt
+++ b/doc/tls.txt
@@ -34,11 +34,11 @@ these methods available:
or more callback functions that were provided to the constructor being
called.
- .. cpp:function void queue_for_sending(const byte buf[], size_t buf_size)
+ .. cpp:function void send(const byte buf[], size_t buf_size)
- If the connection has completed the initial handshake process, he
- data provided is sent to the counterparty. Otherwise, an exception
- is thrown.
+ If the connection has completed the initial handshake process, the
+ data provided is sent to the counterparty as TLS
+ traffic. Otherwise, an exception is thrown.
.. cpp:function:: void close()
diff --git a/src/tls/tls_channel.cpp b/src/tls/tls_channel.cpp
index 46c6d36cd..e688f354d 100644
--- a/src/tls/tls_channel.cpp
+++ b/src/tls/tls_channel.cpp
@@ -182,10 +182,10 @@ void TLS_Channel::read_handshake(byte rec_type,
}
}
-void TLS_Channel::queue_for_sending(const byte buf[], size_t buf_size)
+void TLS_Channel::send(const byte buf[], size_t buf_size)
{
- if(!handshake_completed)
- throw std::runtime_error("Application data cannot be queued before handshake");
+ if(!is_active())
+ throw std::runtime_error("Data cannot be sent on inactive TLS connection");
writer.send(APPLICATION_DATA, buf, buf_size);
}
diff --git a/src/tls/tls_channel.h b/src/tls/tls_channel.h
index 0306d1a74..c86b48f09 100644
--- a/src/tls/tls_channel.h
+++ b/src/tls/tls_channel.h
@@ -32,7 +32,7 @@ class BOTAN_DLL TLS_Channel
/**
* Inject plaintext intended for counterparty
*/
- virtual void queue_for_sending(const byte buf[], size_t buf_size);
+ virtual void send(const byte buf[], size_t buf_size);
/**
* Send a close notification alert