summaryrefslogtreecommitdiff
path: root/lib/gnutls_buffers.h
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2010-07-10 23:10:45 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2010-07-10 23:10:45 +0200
commitd0a081ec1b276a80a4b1ca1dc5109fd27ad0abc2 (patch)
treeddb00a0dabdc443abc2b17232375736e040772b9 /lib/gnutls_buffers.h
parentb3d8ec01ea3ffdc0e58b2f9f62148bc28a91e741 (diff)
downloadgnutls-d0a081ec1b276a80a4b1ca1dc5109fd27ad0abc2.tar.gz
Support scattered write using writev(). This takes
advantage of the new buffering layer and allows queuing of packets and flushing them. This is currently used for handshake messages only. Performance-wise the difference of packing several TLS records in a single write doesn't seem to offer anything over ethernet (that my tests were on). Probably on links with higher latency there would be a benefit.
Diffstat (limited to 'lib/gnutls_buffers.h')
-rw-r--r--lib/gnutls_buffers.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/gnutls_buffers.h b/lib/gnutls_buffers.h
index 729bcfc6c1..5352874b3d 100644
--- a/lib/gnutls_buffers.h
+++ b/lib/gnutls_buffers.h
@@ -22,6 +22,10 @@
* USA
*
*/
+#ifndef GNUTLS_BUFFERS_H
+# define GNUTLS_BUFFERS_H
+
+#define MBUFFER_FLUSH 1
int _gnutls_record_buffer_put (content_type_t type,
gnutls_session_t session, opaque * data,
@@ -37,7 +41,7 @@ void _gnutls_io_clear_read_buffer (gnutls_session_t);
int _gnutls_io_clear_peeked_data (gnutls_session_t session);
ssize_t _gnutls_io_write_buffered (gnutls_session_t session,
- mbuffer_st *bufel);
+ mbuffer_st *bufel, unsigned int mflag);
int _gnutls_handshake_buffer_get_size (gnutls_session_t session);
int _gnutls_handshake_buffer_put (gnutls_session_t session, opaque * data,
@@ -54,8 +58,10 @@ int _gnutls_handshake_buffer_get_ptr (gnutls_session_t session,
ssize_t _gnutls_handshake_io_recv_int (gnutls_session_t, content_type_t,
gnutls_handshake_description_t, void *,
size_t);
-ssize_t _gnutls_handshake_io_send_int (gnutls_session_t,
+void _gnutls_handshake_io_cache_int (gnutls_session_t,
gnutls_handshake_description_t,
mbuffer_st *bufel);
ssize_t _gnutls_io_write_flush (gnutls_session_t session);
ssize_t _gnutls_handshake_io_write_flush (gnutls_session_t session);
+
+#endif