openssl: change read_into to read (#12251)

This commit is contained in:
a-iga 2021-10-21 20:13:04 +09:00 committed by GitHub
parent a84b1a53ec
commit 1ba839dc3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View file

@ -179,7 +179,13 @@ pub fn (mut s SSLConn) socket_read_into_ptr(buf_ptr &byte, len int) ?int {
return res
}
[deprecated: 'call SSLConn.read instead']
[deprecated_after: '2021-11-04']
pub fn (mut s SSLConn) read_into(mut buffer []byte) ?int {
return s.read(mut buffer)
}
pub fn (mut s SSLConn) read(mut buffer []byte) ?int {
res := s.socket_read_into_ptr(&byte(buffer.data), buffer.len) ?
return res
}