mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
all: byte => u8
This commit is contained in:
@ -180,14 +180,14 @@ pub fn (mut s SSLConn) socket_read_into_ptr(buf_ptr &byte, len int) ?int {
|
||||
}
|
||||
|
||||
pub fn (mut s SSLConn) read(mut buffer []byte) ?int {
|
||||
res := s.socket_read_into_ptr(&byte(buffer.data), buffer.len) ?
|
||||
res := s.socket_read_into_ptr(&u8(buffer.data), buffer.len) ?
|
||||
return res
|
||||
}
|
||||
|
||||
// write number of bytes to SSL connection
|
||||
pub fn (mut s SSLConn) write(bytes []byte) ?int {
|
||||
unsafe {
|
||||
mut ptr_base := &byte(bytes.data)
|
||||
mut ptr_base := &u8(bytes.data)
|
||||
mut total_sent := 0
|
||||
for total_sent < bytes.len {
|
||||
ptr := ptr_base + total_sent
|
||||
|
Reference in New Issue
Block a user