...
Source file
src/net/writev_unix.go
Documentation: net
1
2
3
4
5
6
7
8 package net
9
10 import (
11 "runtime"
12 "syscall"
13 )
14
15 func (c *conn) writeBuffers(v *Buffers) (int64, error) {
16 if !c.ok() {
17 return 0, syscall.EINVAL
18 }
19 n, err := c.fd.writeBuffers(v)
20 if err != nil {
21 return n, &OpError{Op: "writev", Net: c.fd.net, Source: c.fd.laddr, Addr: c.fd.raddr, Err: err}
22 }
23 return n, nil
24 }
25
26 func (fd *netFD) writeBuffers(v *Buffers) (n int64, err error) {
27 n, err = fd.pfd.Writev((*[][]byte)(v))
28 runtime.KeepAlive(fd)
29 return n, wrapSyscallError("writev", err)
30 }
31
View as plain text