blob: 25ef4ea0bae812039cb219d5ca531b80c83ffc0d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
.\"
.\" $OpenBSD: SSL_pending.3,v 1.2 2014/12/02 14:11:01 jmc Exp $
.\"
.Dd $Mdocdate: December 2 2014 $
.Dt SSL_PENDING 3
.Os
.Sh NAME
.Nm SSL_pending
.Nd obtain number of readable bytes buffered in an SSL object
.Sh SYNOPSIS
.In openssl/ssl.h
.Ft int
.Fn SSL_pending "const SSL *ssl"
.Sh DESCRIPTION
.Fn SSL_pending
returns the number of bytes which are available inside
.Fa ssl
for immediate read.
.Sh NOTES
Data are received in blocks from the peer.
Therefore data can be buffered inside
.Fa ssl
and are ready for immediate retrieval with
.Xr SSL_read 3 .
.Sh RETURN VALUES
The number of bytes pending is returned.
.Sh SEE ALSO
.Xr ssl 3 ,
.Xr SSL_read 3
.Sh BUGS
.Fn SSL_pending
takes into account only bytes from the TLS/SSL record that is currently being
processed (if any).
If the
.Vt SSL
object's
.Em read_ahead
flag is set, additional protocol bytes may have been read containing more
TLS/SSL records; these are ignored by
.Fn SSL_pending .
.Pp
Up to OpenSSL 0.9.6,
.Fn SSL_pending
does not check if the record type of pending data is application data.
|