This article will show how you can enable ssl on you Apache web server container. Copyright © 2021 Linux Learned by Example – Powered by Customify. Web API Categories ASN.1 Amazon EC2 Amazon Glacier Amazon S3 Amazon S3 (new) Amazon SES Amazon SNS Amazon SQS Async Azure Cloud Storage Azure Service Bus.

Ssl_read Example List


Reads data from this stream and stores it in the specified array.



A Byte array that receives the bytes read from this stream.


A Int32 that contains the zero-based location in buffer at which to begin storing the data read from this stream.


A Int32 that contains the maximum number of bytes to read from this stream.



A Int32 value that specifies the number of bytes read. When there is no more data to be read, returns 0.


buffer is null.

offset is less than zero.


offset is greater than the length of buffer.


Fet car. offset + count is greater than the length of buffer.

The read operation failed. Check the inner exception, if present to determine the cause of the failure.

There is already a read operation in progress.

This object has been closed.

Authentication has not occurred.


The following code example demonstrates reading from an SslStream.


Ssl_read Example Software

The method reads a maximum of count bytes from the stream and stores them in buffer beginning at offset. You cannot perform multiple simultaneous read operations.

You cannot call this method until you have successfully authenticated. To authenticate call one of the AuthenticateAsClient, or BeginAuthenticateAsClient, AuthenticateAsServer, BeginAuthenticateAsServer methods.

To perform this operation asynchronously, use the BeginRead method.

Ssl_read Ssl_write Example

Applies to

Ssl_read Example C++

2007-02-12 22:48:52 UTC

Mbedtls_ssl_read Example

Hi, I have a question. I have multithread system, with non blocking I/O and perhaps 100 connections to servers. I have a special thread, that waits on select(). When it returns me, that I have some data for reading, I start the reading for every connection. When the select throws me timeout, I start the readig too, because it´s possible that some data came, while I was doing previous reading.
I have two types of connection. One TCP, where I use for reading the BIO_read function and one TLS where I use the SSL_read function. Now I have this problem. When I try to read data from some connection, it is posible, that there is not any data. I have read, that when there is not any data, the BIO_read function throws me 0 or -1, but these return values can mean error too. How can I recognize, that this means, that I read only 0b of data?
And I have the similar problem with SSL_read. I use SSL_get_error function to determine, what hapen in reading, but I havent find what error code it returns me, when I read no data? Will it be SSL_ERROR_NONE or SSL_ERROR_ZERO_RETURN?
I apologize for my English. Thanks for answer.
Milan Křápek
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org