diff options
author | Martin Willi <martin@revosec.ch> | 2011-12-31 12:37:08 +0100 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2011-12-31 13:14:49 +0100 |
commit | 3a87c89b1bee52fe84476907a93b83d87ff1462b (patch) | |
tree | 3f774ecbfcd8ad4c61816c2da0f889a6ffd0f51f /src/libtls/tls_socket.h | |
parent | 6a5c86b7ada9dd6a57290f228fd06b20cdf7011b (diff) | |
download | strongswan-3a87c89b1bee52fe84476907a93b83d87ff1462b.tar.bz2 strongswan-3a87c89b1bee52fe84476907a93b83d87ff1462b.tar.xz |
Added a tls_socket_t.splice method to wrap a file descriptor into TLS
Diffstat (limited to 'src/libtls/tls_socket.h')
-rw-r--r-- | src/libtls/tls_socket.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libtls/tls_socket.h b/src/libtls/tls_socket.h index 9f0e9643b..edd05fd29 100644 --- a/src/libtls/tls_socket.h +++ b/src/libtls/tls_socket.h @@ -55,6 +55,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. * * @return file descriptor |