Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 51 for tcpNone (0.12 sec)

  1. src/net/file_test.go

    		if err != nil {
    			if perr := parseDialError(err); perr != nil {
    				t.Error(perr)
    			}
    			t.Fatal(err)
    		}
    		addr := c1.LocalAddr()
    
    		var f *os.File
    		switch c1 := c1.(type) {
    		case *TCPConn:
    			f, err = c1.File()
    		case *UDPConn:
    			f, err = c1.File()
    		case *UnixConn:
    			f, err = c1.File()
    		}
    		if err := c1.Close(); err != nil {
    			if perr := parseCloseError(err, false); perr != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 18 17:20:52 UTC 2023
    - 6.4K bytes
    - Viewed (0)
  2. src/net/file_wasip1.go

    	case "tcp":
    		return &TCPListener{fd: fd}
    	default:
    		panic("unsupported network for file listener: " + fd.net)
    	}
    }
    
    func newFileConn(fd *netFD) Conn {
    	switch fd.net {
    	case "tcp":
    		return &TCPConn{conn{fd: fd}}
    	case "udp":
    		return &UDPConn{conn{fd: fd}}
    	default:
    		panic("unsupported network for file connection: " + fd.net)
    	}
    }
    
    // This helper is implemented in the syscall package. It means we don't have
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 12 23:11:39 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  3. src/net/tcpsock_solaris.go

    //go:build !illumos
    
    package net
    
    import (
    	"internal/syscall/unix"
    	"syscall"
    )
    
    // SetKeepAliveConfig configures keep-alive messages sent by the operating system.
    func (c *TCPConn) SetKeepAliveConfig(config KeepAliveConfig) error {
    	if !c.ok() {
    		return syscall.EINVAL
    	}
    
    	if err := setKeepAlive(c.fd, config.Enable); err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 03:10:07 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  4. src/runtime/internal/wasitest/testdata/tcpecho.go

    	defer c.Close()
    
    	var buf [128]byte
    	n, err := c.Read(buf[:])
    	if err != nil {
    		return err
    	}
    	if _, err := c.Write(buf[:n]); err != nil {
    		return err
    	}
    	if err := c.(*net.TCPConn).CloseWrite(); err != nil {
    		return err
    	}
    	return c.Close()
    }
    
    func findListener() (net.Listener, error) {
    	// We start looking for pre-opened sockets at fd=3 because 0, 1, and 2
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 25 00:12:41 UTC 2023
    - 1.4K bytes
    - Viewed (0)
  5. src/net/net.go

    // tcpConnWithoutReadFrom implements all the methods of *TCPConn other
    // than ReadFrom. This is used to permit ReadFrom to call io.Copy
    // without leading to a recursive call to ReadFrom.
    type tcpConnWithoutReadFrom struct {
    	noReadFrom
    	*TCPConn
    }
    
    // Fallback implementation of io.ReaderFrom's ReadFrom, when sendfile isn't
    // applicable.
    func genericReadFrom(c *TCPConn, r io.Reader) (n int64, err error) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 26.8K bytes
    - Viewed (0)
  6. tools/istio-iptables/pkg/validation/vld_unix.go

    // Recover the original address from redirect socket. Supposed to work for tcp over ipv4 and ipv6.
    func GetOriginalDestination(conn net.Conn) (daddr net.IP, dport uint16, err error) {
    	// obtain os fd from Conn
    	tcp, ok := conn.(*net.TCPConn)
    	if !ok {
    		err = errors.New("socket is not tcp")
    		return
    	}
    	file, err := tcp.File()
    	if err != nil {
    		return
    	}
    	defer file.Close()
    	fd := file.Fd()
    
    	// Detect underlying ip is v4 or v6
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Feb 08 03:52:24 UTC 2024
    - 3K bytes
    - Viewed (0)
  7. pkg/hbone/util.go

    	// nolint: staticcheck
    	defer bufferPoolCopy.Put(buf1)
    	bufCap := cap(buf1)
    	buf := buf1[0:bufCap:bufCap]
    
    	// For netstack: src is a gonet.Conn, doesn't implement WriterTo. Dst is a net.TcpConn - and implements ReadFrom.
    	// CopyBuffered is the actual implementation of Copy and CopyBuffer.
    	// if buf is nil, one is allocated.
    	// Duplicated from io
    
    	// This will prevent stats from working.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 17:08:31 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  8. pkg/test/echo/server/endpoint/util.go

    func forceClose(conn net.Conn) error {
    	// Close may be called more than once.
    	defer func() { _ = conn.Close() }()
    
    	// Force the connection closed (should result in sending RST)
    	return conn.(*net.TCPConn).SetLinger(0)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 17:08:31 UTC 2023
    - 2.6K bytes
    - Viewed (0)
  9. src/net/file_wasip1_test.go

    		t.Errorf("newFileListener: tcp listener type mismatch: %T", l)
    	} else {
    		testIsTCPAddr(t, "Addr", l.Addr())
    	}
    }
    
    func TestWasip1NewFileConn(t *testing.T) {
    	if c, ok := newFileConn(newFD("tcp", -1)).(*TCPConn); !ok {
    		t.Errorf("newFileConn: tcp conn type mismatch: %T", c)
    	} else {
    		testIsTCPAddr(t, "LocalAddr", c.LocalAddr())
    		testIsTCPAddr(t, "RemoteAddr", c.RemoteAddr())
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 13 21:06:56 UTC 2023
    - 3.8K bytes
    - Viewed (0)
  10. src/net/mptcpsock_linux.go

    	major, minor := unix.KernelVersion()
    	// SOL_MPTCP only supported from kernel 5.16
    	hasSOLMPTCP = major > 5 || (major == 5 && minor >= 16)
    }
    
    func (sd *sysDialer) dialMPTCP(ctx context.Context, laddr, raddr *TCPAddr) (*TCPConn, error) {
    	if supportsMultipathTCP() {
    		if conn, err := sd.doDialTCPProto(ctx, laddr, raddr, _IPPROTO_MPTCP); err == nil {
    			return conn, nil
    		}
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 24 18:48:34 UTC 2023
    - 4K bytes
    - Viewed (0)
Back to top