mirror of
https://github.com/golang/go
synced 2024-11-22 04:34:39 -07:00
net: Fix inaccurate docs for AcceptTCP and AcceptUnix.
R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/13592043
This commit is contained in:
parent
640a57c881
commit
a3834a2e8a
@ -111,7 +111,7 @@ type TCPListener struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// AcceptTCP accepts the next incoming call and returns the new
|
// AcceptTCP accepts the next incoming call and returns the new
|
||||||
// connection and the remote address.
|
// connection.
|
||||||
func (l *TCPListener) AcceptTCP() (*TCPConn, error) {
|
func (l *TCPListener) AcceptTCP() (*TCPConn, error) {
|
||||||
if l == nil || l.fd == nil || l.fd.ctl == nil {
|
if l == nil || l.fd == nil || l.fd.ctl == nil {
|
||||||
return nil, syscall.EINVAL
|
return nil, syscall.EINVAL
|
||||||
|
@ -225,7 +225,7 @@ type TCPListener struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// AcceptTCP accepts the next incoming call and returns the new
|
// AcceptTCP accepts the next incoming call and returns the new
|
||||||
// connection and the remote address.
|
// connection.
|
||||||
func (l *TCPListener) AcceptTCP() (*TCPConn, error) {
|
func (l *TCPListener) AcceptTCP() (*TCPConn, error) {
|
||||||
if l == nil || l.fd == nil {
|
if l == nil || l.fd == nil {
|
||||||
return nil, syscall.EINVAL
|
return nil, syscall.EINVAL
|
||||||
|
@ -97,7 +97,7 @@ func ListenUnix(net string, laddr *UnixAddr) (*UnixListener, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// AcceptUnix accepts the next incoming call and returns the new
|
// AcceptUnix accepts the next incoming call and returns the new
|
||||||
// connection and the remote address.
|
// connection.
|
||||||
func (l *UnixListener) AcceptUnix() (*UnixConn, error) {
|
func (l *UnixListener) AcceptUnix() (*UnixConn, error) {
|
||||||
return nil, syscall.EPLAN9
|
return nil, syscall.EPLAN9
|
||||||
}
|
}
|
||||||
|
@ -275,7 +275,7 @@ func ListenUnix(net string, laddr *UnixAddr) (*UnixListener, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// AcceptUnix accepts the next incoming call and returns the new
|
// AcceptUnix accepts the next incoming call and returns the new
|
||||||
// connection and the remote address.
|
// connection.
|
||||||
func (l *UnixListener) AcceptUnix() (*UnixConn, error) {
|
func (l *UnixListener) AcceptUnix() (*UnixConn, error) {
|
||||||
if l == nil || l.fd == nil {
|
if l == nil || l.fd == nil {
|
||||||
return nil, syscall.EINVAL
|
return nil, syscall.EINVAL
|
||||||
|
Loading…
Reference in New Issue
Block a user