Added a tls_socket_t.splice method to wrap a file descriptor into TLS

This commit is contained in:
Martin Willi
2011-12-31 13:14:49 +01:00
parent 6a5c86b7ad
commit 3a87c89b1b
2 changed files with 107 additions and 5 deletions
+12
View File
@@ -54,6 +54,18 @@ struct tls_socket_t {
*/
bool (*write)(tls_socket_t *this, chunk_t data);
/**
* Read/write plain data from file descriptor.
*
* This call is blocking, but a thread cancellation point. Data is
* exchanged until one of the sockets gets closed or an error occurs.
*
* @param rfd file descriptor to read plain data from
* @param wfd file descriptor to write plain data to
* @return TRUE if data exchanged successfully
*/
bool (*splice)(tls_socket_t *this, int rfd, int wfd);
/**
* Get the underlying file descriptor passed to the constructor.
*