Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,150 for IsStream (0.12 sec)

  1. src/os/zero_copy_linux.go

    	}
    	return err
    }
    
    func (f *File) writeTo(w io.Writer) (written int64, handled bool, err error) {
    	pfd, network := getPollFDAndNetwork(w)
    	// TODO(panjf2000): same as File.spliceToFile.
    	if pfd == nil || !pfd.IsStream || !isUnixOrTCP(string(network)) {
    		return
    	}
    
    	sc, err := f.SyscallConn()
    	if err != nil {
    		return
    	}
    
    	rerr := sc.Read(func(fd uintptr) (done bool) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 18:12:56 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  2. src/internal/poll/writev.go

    	var n int64
    	var err error
    	for len(*v) > 0 {
    		iovecs = iovecs[:0]
    		for _, chunk := range *v {
    			if len(chunk) == 0 {
    				continue
    			}
    			iovecs = append(iovecs, newIovecWithBase(&chunk[0]))
    			if fd.IsStream && len(chunk) > 1<<30 {
    				iovecs[len(iovecs)-1].SetLen(1 << 30)
    				break // continue chunk on next writev
    			}
    			iovecs[len(iovecs)-1].SetLen(len(chunk))
    			if len(iovecs) == maxVec {
    				break
    			}
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 27 18:23:49 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  3. src/internal/poll/fd_wasip1.go

    // descriptor isn't closed until all FD instances that refer to it have been
    // closed/destroyed.
    func (fd *FD) Copy() FD {
    	return FD{
    		Sysfd:         fd.Sysfd,
    		SysFile:       fd.SysFile.ref(),
    		IsStream:      fd.IsStream,
    		ZeroReadIsEOF: fd.ZeroReadIsEOF,
    		isBlocking:    fd.isBlocking,
    		isFile:        fd.isFile,
    	}
    }
    
    // dupCloseOnExecOld always errors on wasip1 because there is no mechanism to
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 20:14:02 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  4. src/internal/poll/fd_windows_test.go

    	s, err := windows.WSASocket(syscall.AF_INET, syscall.SOCK_STREAM, syscall.IPPROTO_TCP, nil, 0, windows.WSA_FLAG_OVERLAPPED)
    	if err != nil {
    		t.Fatal(err)
    	}
    	fd := poll.FD{Sysfd: s, IsStream: true, ZeroReadIsEOF: true}
    	_, err = fd.Init("tcp", true)
    	if err != nil {
    		syscall.CloseHandle(s)
    		t.Fatal(err)
    	}
    	defer fd.Close()
    
    	const SIO_TCP_INFO = syscall.IOC_INOUT | syscall.IOC_VENDOR | 39
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 14 08:33:36 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  5. src/net/fd_fake.go

    	// the remainder of the netFD calls to fakeNetFD.
    	*fakeNetFD
    }
    
    func newFD(net string, sysfd int) *netFD {
    	return newPollFD(net, poll.FD{
    		Sysfd:         sysfd,
    		IsStream:      true,
    		ZeroReadIsEOF: true,
    	})
    }
    
    func newPollFD(net string, pfd poll.FD) *netFD {
    	var laddr Addr
    	var raddr Addr
    	// WASI preview 1 does not have functions like getsockname/getpeername,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 20 15:56:08 UTC 2023
    - 3.8K bytes
    - Viewed (0)
  6. src/net/fd_plan9.go

    type netFD struct {
    	pfd poll.FD
    
    	// immutable until Close
    	net               string
    	n                 string
    	dir               string
    	listen, ctl, data *os.File
    	laddr, raddr      Addr
    	isStream          bool
    }
    
    var netdir = "/net" // default network
    
    func newFD(net, name string, listen, ctl, data *os.File, laddr, raddr Addr) (*netFD, error) {
    	ret := &netFD{
    		net:    net,
    		n:      name,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 04 16:01:50 UTC 2018
    - 3.6K bytes
    - Viewed (0)
  7. src/net/fd_unix.go

    	writeToSyscallName  = "sendto"
    	writeMsgSyscallName = "sendmsg"
    )
    
    func newFD(sysfd, family, sotype int, net string) (*netFD, error) {
    	ret := &netFD{
    		pfd: poll.FD{
    			Sysfd:         sysfd,
    			IsStream:      sotype == syscall.SOCK_STREAM,
    			ZeroReadIsEOF: sotype != syscall.SOCK_DGRAM && sotype != syscall.SOCK_RAW,
    		},
    		family: family,
    		sotype: sotype,
    		net:    net,
    	}
    	return ret, nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 24 20:19:46 UTC 2023
    - 5.4K bytes
    - Viewed (0)
  8. src/net/fd_windows.go

    	return false
    }
    
    func newFD(sysfd syscall.Handle, family, sotype int, net string) (*netFD, error) {
    	ret := &netFD{
    		pfd: poll.FD{
    			Sysfd:         sysfd,
    			IsStream:      sotype == syscall.SOCK_STREAM,
    			ZeroReadIsEOF: sotype != syscall.SOCK_DGRAM && sotype != syscall.SOCK_RAW,
    		},
    		family: family,
    		sotype: sotype,
    		net:    net,
    	}
    	return ret, nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 07 16:46:10 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apimachinery/pkg/util/httpstream/wsstream/stream.go

    // the exact bytes written to the stream. Zero byte messages are possible.
    const binaryWebSocketProtocol = "binary.k8s.io"
    
    // The WebSocket subprotocol "base64.binary.k8s.io" will only send messages to the
    // client and ignore messages sent to the server. The received messages are
    // a base64 version of the bytes written to the stream. Zero byte messages are
    // possible.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 07 18:21:43 UTC 2023
    - 5.2K bytes
    - Viewed (0)
  10. internal/grid/stream.go

    	// If the request context is canceled, the stream will no longer process requests.
    	// Requests sent cannot be used any further by the called.
    	Requests chan<- []byte
    
    	muxID uint64
    	ctx   context.Context
    }
    
    // Send a payload to the remote server.
    func (s *Stream) Send(b []byte) error {
    	if s.Requests == nil {
    		return errors.New("stream does not accept requests")
    	}
    	select {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Jun 07 15:51:52 UTC 2024
    - 3.1K bytes
    - Viewed (0)
Back to top