mirror of
https://github.com/golang/go
synced 2024-09-15 22:20:06 +00:00
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:
parent
43b3e6e02a
commit
ebe5f203bf
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue