]> Cypherpunks repositories - gostls13.git/commitdiff
net: don't export netFD closeRead and closeWrite methods
authorMikio Hara <mikioh.mikioh@gmail.com>
Fri, 4 Apr 2014 00:07:44 +0000 (09:07 +0900)
committerMikio Hara <mikioh.mikioh@gmail.com>
Fri, 4 Apr 2014 00:07:44 +0000 (09:07 +0900)
LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/83910043

src/pkg/net/fd_plan9.go
src/pkg/net/fd_unix.go
src/pkg/net/fd_windows.go
src/pkg/net/tcpsock_plan9.go
src/pkg/net/tcpsock_posix.go
src/pkg/net/unixsock_posix.go

index 4309a87c3a4a69e397286b453bc0e1830b9163f0..5fe8effc2954dc3ebd7ebe965dd253f36aaf9c85 100644 (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
        }
index 7a8d7d3da7f21f7632efbf9df81aadc9f01f0ece..dbfbf2bd5c873ddebae9c224788bf5f979e916d2 100644 (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)
 }
 
index b64410c4776d6b5925e21db03258ea57dcb28a22..a1f6bc5f8148cb40fcbf45c7507da707dd5c89dd 100644 (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)
 }
 
index 6e1a8b9a1928f1168364ba43890365af425b87ae..92e98be6f76a558adeea8c19168180a779f0776e 100644 (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
index cbae7f3c62179be941c6d202bd11ac5f1157a2dd..d72c96777da098226649c0b19682e9e985f7fd86 100644 (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
index c75c0b01a2de8ec22e3faff82a1774ac879965af..2610779bfd28ac69cad7ce695a4db9b5463e0f78 100644 (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,