mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
net/os: deprecate write_str() in favor of write_string()
This commit is contained in:
@ -67,10 +67,16 @@ pub fn (mut c TcpConn) write(bytes []byte) ?int {
|
||||
}
|
||||
|
||||
// write_str blocks and attempts to write all data
|
||||
[deprecated: 'use TcpConn.write_string() instead']
|
||||
pub fn (mut c TcpConn) write_str(s string) ?int {
|
||||
return c.write_ptr(s.str, s.len)
|
||||
}
|
||||
|
||||
// write_string blocks and attempts to write all data
|
||||
pub fn (mut c TcpConn) write_string(s string) ?int {
|
||||
return c.write_ptr(s.str, s.len)
|
||||
}
|
||||
|
||||
pub fn (mut c TcpConn) read_ptr(buf_ptr byteptr, len int) ?int {
|
||||
mut res := wrap_read_result(C.recv(c.sock.handle, buf_ptr, len, 0)) ?
|
||||
$if trace_tcp ? {
|
||||
|
Reference in New Issue
Block a user