net: don't export netFD closeRead and closeWrite methods

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/83910043
This commit is contained in:
Mikio Hara 2014-04-04 09:07:44 +09:00
parent 43b3e6e02a
commit ebe5f203bf
6 changed files with 12 additions and 12 deletions

View file

@ -150,14 +150,14 @@ func (fd *netFD) Write(b []byte) (n int, err error) {
return fd.data.Write(b)
}
func (fd *netFD) CloseRead() error {
func (fd *netFD) closeRead() error {
if !fd.ok() {
return syscall.EINVAL
}
return syscall.EPLAN9
}
func (fd *netFD) CloseWrite() error {
func (fd *netFD) closeWrite() error {
if !fd.ok() {
return syscall.EINVAL
}

View file

@ -208,11 +208,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)
}

View file

@ -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)
}

View file

@ -32,7 +32,7 @@ func (c *TCPConn) CloseRead() error {
if !c.ok() {
return syscall.EINVAL
}
return c.fd.CloseRead()
return c.fd.closeRead()
}
// CloseWrite shuts down the writing side of the TCP connection.
@ -41,7 +41,7 @@ func (c *TCPConn) CloseWrite() error {
if !c.ok() {
return syscall.EINVAL
}
return c.fd.CloseWrite()
return c.fd.closeWrite()
}
// SetLinger sets the behavior of Close() on a connection which still

View file

@ -78,7 +78,7 @@ func (c *TCPConn) CloseRead() error {
if !c.ok() {
return syscall.EINVAL
}
return c.fd.CloseRead()
return c.fd.closeRead()
}
// CloseWrite shuts down the writing side of the TCP connection.
@ -87,7 +87,7 @@ func (c *TCPConn) CloseWrite() error {
if !c.ok() {
return syscall.EINVAL
}
return c.fd.CloseWrite()
return c.fd.closeWrite()
}
// SetLinger sets the behavior of Close() on a connection which still

View file

@ -222,7 +222,7 @@ func (c *UnixConn) CloseRead() error {
if !c.ok() {
return syscall.EINVAL
}
return c.fd.CloseRead()
return c.fd.closeRead()
}
// CloseWrite shuts down the writing side of the Unix domain connection.
@ -231,7 +231,7 @@ func (c *UnixConn) CloseWrite() error {
if !c.ok() {
return syscall.EINVAL
}
return c.fd.CloseWrite()
return c.fd.closeWrite()
}
// DialUnix connects to the remote address raddr on the network net,