Commit ebe5f203 authored by Mikio Hara's avatar Mikio Hara

net: don't export netFD closeRead and closeWrite methods

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/83910043
parent 43b3e6e0
......@@ -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
}
......
......@@ -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)
}
......
......@@ -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)
}
......
......@@ -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
......
......@@ -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
......
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment