mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
net/os: deprecate write_str() in favor of write_string()
This commit is contained in:
parent
8fa7e67000
commit
bb79df932b
2 changed files with 8 additions and 7 deletions
|
@ -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 ? {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue