max buffer size SSL_read, SSL_write
Closed this issue · 1 comments
IvankoEanko commented
Hello. How can i increase my buffer size, because i want to get all data at once. I have 0x5000 bytes, and i want to get it at once, but SSL_read gets only 0x4000, how can i change it?
auto b = SSL_get_rbio(ssl);
BIO_set_read_buffer_size(b, 65536);
b = SSL_get_wbio(ssl);
BIO_set_write_buffer_size(b, 65536);
i tried this one but it looks ugly and returns 0 which means an error occurred.
I used to try setockopt RCV_BUFFER and SND_BUFFER and thought it would work for SSL, but today I realized that it doesn't work for SSL, only for socket.
bob-beck commented
Setting the receive and send buffer on a socket still does not guarantee you will receive all your data at once, even if the buffer is bigger than what you are sending, so you should probably re-think your approach in any case.