Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 60 for setLinger (0.27 sec)

  1. src/net/tcpsock.go

    // until all data has been sent or discarded.
    // On some operating systems after sec seconds have elapsed any remaining
    // unsent data may be discarded.
    func (c *TCPConn) SetLinger(sec int) error {
    	if !c.ok() {
    		return syscall.EINVAL
    	}
    	if err := setLinger(c.fd, sec); err != nil {
    		return &OpError{Op: "set", Net: c.fd.net, Source: c.fd.laddr, Addr: c.fd.raddr, Err: err}
    	}
    	return nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 03:10:07 UTC 2024
    - 13.7K bytes
    - Viewed (0)
  2. src/net/net_fake.go

    func (ffd *fakeNetFD) setWriteBuffer(bytes int) error {
    	return os.NewSyscallError("setWriteBuffer", syscall.ENOTSUP)
    }
    
    func (ffd *fakeNetFD) setLinger(sec int) error {
    	if sec < 0 || ffd.peer == nil {
    		return os.NewSyscallError("setLinger", syscall.EINVAL)
    	}
    	ffd.peer.queue.setLinger(sec > 0)
    	return nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 27 19:24:21 UTC 2024
    - 26.4K bytes
    - Viewed (0)
  3. src/net/net_test.go

    	serverDone := make(chan struct{})
    	dialed := make(chan struct{})
    	go func() {
    		defer close(serverDone)
    
    		cs, err := ln.Accept()
    		if err != nil {
    			return
    		}
    		<-dialed
    		cs.(*TCPConn).SetLinger(0)
    		cs.Close()
    	}()
    	defer func() {
    		ln.Close()
    		<-serverDone
    	}()
    
    	ss, err := Dial("tcp", ln.Addr().String())
    	close(dialed)
    	if err != nil {
    		t.Fatal(err)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 22 21:04:44 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/util/dump/dump_test.go

    import (
    	"fmt"
    	"testing"
    )
    
    func ptrint(i int) *int {
    	return &i
    }
    
    func ptrstr(s string) *string {
    	return &s
    }
    
    // custom type to test Stringer interface on non-pointer receiver.
    type customString string
    
    // String implements the Stringer interface for testing invocation
    func (s customString) String() string {
    	return "custom string " + string(s)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Mar 27 01:24:22 UTC 2023
    - 10.3K bytes
    - Viewed (0)
  5. src/fmt/print.go

    type Formatter interface {
    	Format(f State, verb rune)
    }
    
    // Stringer is implemented by any value that has a String method,
    // which defines the “native” format for that value.
    // The String method is used to print values passed as an operand
    // to any format that accepts a string or to an unformatted printer
    // such as [Print].
    type Stringer interface {
    	String() string
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 21:22:43 UTC 2024
    - 31.8K bytes
    - Viewed (0)
  6. cmd/apierrorcode_string.go

    // Code generated by "stringer -type=APIErrorCode -trimprefix=Err api-errors.go"; DO NOT EDIT.
    
    package cmd
    
    import "strconv"
    
    func _() {
    	// An "invalid array index" compiler error signifies that the constant values have changed.
    	// Re-run the stringer command to generate them again.
    	var x [1]struct{}
    	_ = x[ErrNone-0]
    	_ = x[ErrAccessDenied-1]
    	_ = x[ErrBadDigest-2]
    	_ = x[ErrEntityTooSmall-3]
    	_ = x[ErrEntityTooLarge-4]
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Jun 13 22:26:38 UTC 2024
    - 21.4K bytes
    - Viewed (0)
  7. src/io/multi_test.go

    		t.Errorf(`expected "foo bar"; got %q`, result)
    	}
    }
    
    func TestMultiWriter(t *testing.T) {
    	sink := new(bytes.Buffer)
    	// Hide bytes.Buffer's WriteString method:
    	testMultiWriter(t, struct {
    		Writer
    		fmt.Stringer
    	}{sink, sink})
    }
    
    func TestMultiWriter_String(t *testing.T) {
    	testMultiWriter(t, new(bytes.Buffer))
    }
    
    // Test that a multiWriter.WriteString calls results in at most 1 allocation,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 06 15:49:32 UTC 2022
    - 10K bytes
    - Viewed (0)
  8. src/debug/dwarf/const.go

    // Copyright 2009 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Constants
    
    package dwarf
    
    //go:generate stringer -type Attr -trimprefix=Attr
    
    // An Attr identifies the attribute type in a DWARF [Entry.Field].
    type Attr uint32
    
    const (
    	AttrSibling        Attr = 0x01
    	AttrLocation       Attr = 0x02
    	AttrName           Attr = 0x03
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 18 19:33:30 UTC 2023
    - 13.8K bytes
    - Viewed (0)
  9. Makefile

    	@echo "Installing msgp" && go install -v github.com/tinylib/msgp@v1.1.10-0.20240227114326-6d6f813fff1b
    	@echo "Installing stringer" && go install -v golang.org/x/tools/cmd/stringer@latest
    
    crosscompile: ## cross compile minio
    	@(env bash $(PWD)/buildscripts/cross-compile.sh)
    
    verifiers: lint check-gen
    
    check-gen: ## check for updated autogenerated files
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 17:41:02 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  10. src/cmd/vet/vet_test.go

    		cmd.Env = append(os.Environ(), "GOWORK=off")
    		cmd.Dir = "testdata/rangeloop"
    		cmd.Stderr = new(strings.Builder) // all vet output goes to stderr
    		cmd.Run()
    		stderr := cmd.Stderr.(fmt.Stringer).String()
    
    		filename := filepath.FromSlash("testdata/rangeloop/rangeloop.go")
    
    		// Unlike the tests above, which runs vet in cmd/vet/, this one
    		// runs it in subdirectory, so the "full names" in the output
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 01:02:40 UTC 2024
    - 12.5K bytes
    - Viewed (0)
Back to top