diff options
Diffstat (limited to 'src/pkg/net/fd_windows.go')
-rw-r--r-- | src/pkg/net/fd_windows.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/pkg/net/fd_windows.go b/src/pkg/net/fd_windows.go index 630fc5e6f..a1f6bc5f8 100644 --- a/src/pkg/net/fd_windows.go +++ b/src/pkg/net/fd_windows.go @@ -119,7 +119,7 @@ func (o *operation) InitBuf(buf []byte) { o.buf.Len = uint32(len(buf)) o.buf.Buf = nil if len(buf) != 0 { - o.buf.Buf = (*byte)(unsafe.Pointer(&buf[0])) + o.buf.Buf = &buf[0] } } @@ -431,11 +431,11 @@ func (fd *netFD) shutdown(how int) error { return nil } -func (fd *netFD) CloseRead() error { +func (fd *netFD) closeRead() error { return fd.shutdown(syscall.SHUT_RD) } -func (fd *netFD) CloseWrite() error { +func (fd *netFD) closeWrite() error { return fd.shutdown(syscall.SHUT_WR) } @@ -458,7 +458,7 @@ func (fd *netFD) Read(buf []byte) (int, error) { return n, err } -func (fd *netFD) ReadFrom(buf []byte) (n int, sa syscall.Sockaddr, err error) { +func (fd *netFD) readFrom(buf []byte) (n int, sa syscall.Sockaddr, err error) { if len(buf) == 0 { return 0, nil, nil } @@ -497,7 +497,7 @@ func (fd *netFD) Write(buf []byte) (int, error) { }) } -func (fd *netFD) WriteTo(buf []byte, sa syscall.Sockaddr) (int, error) { +func (fd *netFD) writeTo(buf []byte, sa syscall.Sockaddr) (int, error) { if len(buf) == 0 { return 0, nil } @@ -628,10 +628,10 @@ func (fd *netFD) dup() (*os.File, error) { var errNoSupport = errors.New("address family not supported") -func (fd *netFD) ReadMsg(p []byte, oob []byte) (n, oobn, flags int, sa syscall.Sockaddr, err error) { +func (fd *netFD) readMsg(p []byte, oob []byte) (n, oobn, flags int, sa syscall.Sockaddr, err error) { return 0, 0, 0, nil, errNoSupport } -func (fd *netFD) WriteMsg(p []byte, oob []byte, sa syscall.Sockaddr) (n int, oobn int, err error) { +func (fd *netFD) writeMsg(p []byte, oob []byte, sa syscall.Sockaddr) (n int, oobn int, err error) { return 0, 0, errNoSupport } |