diff options
author | Matt Caswell <matt@openssl.org> | 2016-10-20 09:56:18 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2016-10-28 09:48:54 +0100 |
commit | b055fceb9bd8f613f39dab9df4d77b2a95231755 (patch) | |
tree | a772ae80ddbbc7e830c380ff30f7ceb453cd2e2f /doc/man3/BIO_read.pod | |
parent | 98e553d2ce31e2179be68d6a60b5bec765cd9768 (diff) |
Document the new BIO functions introduced as part of the size_t work
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'doc/man3/BIO_read.pod')
-rw-r--r-- | doc/man3/BIO_read.pod | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/doc/man3/BIO_read.pod b/doc/man3/BIO_read.pod index 45871c1be9..6baa075fc2 100644 --- a/doc/man3/BIO_read.pod +++ b/doc/man3/BIO_read.pod @@ -2,19 +2,30 @@ =head1 NAME -BIO_read, BIO_write, BIO_gets, BIO_puts - BIO I/O functions +BIO_read_ex, BIO_write_ex, BIO_read, BIO_write, BIO_gets, BIO_puts +- BIO I/O functions =head1 SYNOPSIS #include <openssl/bio.h> - int BIO_read(BIO *b, void *buf, int len); - int BIO_gets(BIO *b, char *buf, int size); - int BIO_write(BIO *b, const void *buf, int len); - int BIO_puts(BIO *b, const char *buf); + int BIO_read_ex(BIO *b, void *out, size_t outl, size_t *read); + int BIO_write_ex(BIO *b, const void *in, size_t inl, size_t *written); + + int BIO_read(BIO *b, void *buf, int len); + int BIO_gets(BIO *b, char *buf, int size); + int BIO_write(BIO *b, const void *buf, int len); + int BIO_puts(BIO *b, const char *buf); =head1 DESCRIPTION +BIO_read_ex() attempts to read B<outl> bytes from BIO B<b> and places the data +in B<out>. If any bytes were successfully read then the number of bytes read is +stored in B<*read>. + +BIO_write_ex() attempts to write B<inl> bytes from B<in> to BIO B<b>. If +successful then the number of bytes written is stored in B<*written>. + BIO_read() attempts to read B<len> bytes from BIO B<b> and places the data in B<buf>. @@ -31,7 +42,10 @@ BIO_puts() attempts to write a NUL-terminated string B<buf> to BIO B<b>. =head1 RETURN VALUES -All these functions return either the amount of data successfully read or +BIO_read_ex() and BIO_write_ex() return 1 if data was successfully read or +written, and 0 otherwise. + +All other functions return either the amount of data successfully read or written (if the return value is positive) or that no data was successfully read or written if the result is 0 or -1. If the return value is -2 then the operation is not implemented in the specific BIO type. The trailing |