summaryrefslogtreecommitdiff
path: root/src/pkg/net/tcpsock.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/net/tcpsock.go')
-rw-r--r--src/pkg/net/tcpsock.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pkg/net/tcpsock.go b/src/pkg/net/tcpsock.go
index 263319626..680ed3021 100644
--- a/src/pkg/net/tcpsock.go
+++ b/src/pkg/net/tcpsock.go
@@ -73,7 +73,7 @@ type TCPConn struct {
func newTCPConn(fd *netFD) *TCPConn {
c := &TCPConn{fd};
- setsockoptInt(fd.fd, syscall.IPPROTO_TCP, syscall.TCP_NODELAY, 1);
+ setsockoptInt(fd.sysfd, syscall.IPPROTO_TCP, syscall.TCP_NODELAY, 1);
return c;
}
@@ -234,9 +234,9 @@ func ListenTCP(net string, laddr *TCPAddr) (l *TCPListener, err os.Error) {
if err != nil {
return nil, err
}
- errno := syscall.Listen(fd.fd, listenBacklog());
+ errno := syscall.Listen(fd.sysfd, listenBacklog());
if errno != 0 {
- syscall.Close(fd.fd);
+ syscall.Close(fd.sysfd);
return nil, &OpError{"listen", "tcp", laddr, os.Errno(errno)};
}
l = new(TCPListener);
@@ -247,7 +247,7 @@ func ListenTCP(net string, laddr *TCPAddr) (l *TCPListener, err os.Error) {
// AcceptTCP accepts the next incoming call and returns the new connection
// and the remote address.
func (l *TCPListener) AcceptTCP() (c *TCPConn, err os.Error) {
- if l == nil || l.fd == nil || l.fd.fd < 0 {
+ if l == nil || l.fd == nil || l.fd.sysfd < 0 {
return nil, os.EINVAL
}
fd, err := l.fd.accept(sockaddrToTCP);