gtpc1m64Transmission Control Protocol/Internet Protocol

SSL_read

The SSL_read function reads application data from a Secure Sockets Layer (SSL) session.

Format

#include <openssl/ssl.h>
int SSL_read(SSL *ssl,char *buf,int num)

ssl
A pointer to a token returned on the SSL_new call.

buf
A pointer to the buffer into which to read the data.

num
The maximum number of bytes of data that the application can read.

Normal Return

Returns the number of bytes of data (from 1 to the value specified on the num parameter) that are read.

Error Return

A return code equal to 0 or a negative number indicates an error. Issue the SSL_get_error function to obtain specific information about the error.

Programming Considerations

If this is a shared SSL session, the socket will be changed to nonblocking mode when the SSL_read function is completed.

Examples

For sample SSL applications, go to http://www.ibm.com/tpf/pubs/tpfpubs.htm, click SSL for the TPF 4.1 System: An Online User's Guide, and click Examples from the left navigation bar.

Related Information