diff options
author | Matt Caswell <matt@openssl.org> | 2016-02-12 12:03:58 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2016-03-07 21:39:27 +0000 |
commit | 49580f25b3e6239a277c9fc2708c0354f419ec17 (patch) | |
tree | 999a9deacba23fb70b41ab170aca8f2a21650e4e /ssl/record/record.h | |
parent | dad78fb13d790cd06afd6e88067c038d22d7780f (diff) |
Add an SSL_has_pending() function
This is similar to SSL_pending() but just returns a 1 if there is data
pending in the internal OpenSSL buffers or 0 otherwise (as opposed to
SSL_pending() which returns the number of bytes available). Unlike
SSL_pending() this will work even if "read_ahead" is set (which is the
case if you are using read pipelining, or if you are doing DTLS). A 1
return value means that we have unprocessed data. It does *not* necessarily
indicate that there will be application data returned from a call to
SSL_read(). The unprocessed data may not be application data or there
could be errors when we attempt to parse the records.
Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'ssl/record/record.h')
-rw-r--r-- | ssl/record/record.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ssl/record/record.h b/ssl/record/record.h index a1febc5551..c8c73d8470 100644 --- a/ssl/record/record.h +++ b/ssl/record/record.h @@ -322,8 +322,8 @@ typedef struct record_layer_st { void RECORD_LAYER_init(RECORD_LAYER *rl, SSL *s); void RECORD_LAYER_clear(RECORD_LAYER *rl); void RECORD_LAYER_release(RECORD_LAYER *rl); -int RECORD_LAYER_read_pending(RECORD_LAYER *rl); -int RECORD_LAYER_write_pending(RECORD_LAYER *rl); +int RECORD_LAYER_read_pending(const RECORD_LAYER *rl); +int RECORD_LAYER_write_pending(const RECORD_LAYER *rl); int RECORD_LAYER_set_data(RECORD_LAYER *rl, const unsigned char *buf, int len); void RECORD_LAYER_reset_read_sequence(RECORD_LAYER *rl); void RECORD_LAYER_reset_write_sequence(RECORD_LAYER *rl); |