An error occurred fetching the project authors.
  1. 30 May, 2018 1 commit
    • Audrius Butkevicius's avatar
      net: add ListenConfig, Dialer.Control to permit socket opts before listen/dial · 3c4d3bdd
      Audrius Butkevicius authored
      Existing implementation does not provide a way to set options such as
      SO_REUSEPORT, that has to be set prior the socket being bound.
      
      New exposed API:
      pkg net, method (*ListenConfig) Listen(context.Context, string, string) (Listener, error)
      pkg net, method (*ListenConfig) ListenPacket(context.Context, string, string) (PacketConn, error)
      pkg net, type ListenConfig struct
      pkg net, type ListenConfig struct, Control func(string, string, syscall.RawConn) error
      pkg net, type Dialer struct, Control func(string, string, syscall.RawConn) error
      
      Fixes #9661
      
      Change-Id: If4d275711f823df72d3ac5cc3858651a6a57cccb
      Reviewed-on: https://go-review.googlesource.com/72810
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      3c4d3bdd
  2. 29 May, 2018 1 commit
  3. 02 Nov, 2016 1 commit
  4. 28 Oct, 2016 2 commits
  5. 15 Apr, 2016 1 commit
  6. 16 Mar, 2016 1 commit
  7. 03 Mar, 2016 1 commit
    • Mikio Hara's avatar
      net: deduplicate TCP socket code · b0f4ee53
      Mikio Hara authored
      This change consolidates functions and methods related to TCPAddr,
      TCPConn and TCPListener for maintenance purpose, especially for
      documentation. Also refactors Dial error code paths.
      
      The followup changes will update comments and examples.
      
      Updates #10624.
      
      Change-Id: I3333ee218ebcd08928f9e2826cd1984d15ea153e
      Reviewed-on: https://go-review.googlesource.com/20009Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      b0f4ee53
  8. 02 Mar, 2016 1 commit
    • Brad Fitzpatrick's avatar
      all: single space after period. · 5fea2ccc
      Brad Fitzpatrick authored
      The tree's pretty inconsistent about single space vs double space
      after a period in documentation. Make it consistently a single space,
      per earlier decisions. This means contributors won't be confused by
      misleading precedence.
      
      This CL doesn't use go/doc to parse. It only addresses // comments.
      It was generated with:
      
      $ perl -i -npe 's,^(\s*// .+[a-z]\.)  +([A-Z]),$1 $2,' $(git grep -l -E '^\s*//(.+\.)  +([A-Z])')
      $ go test go/doc -update
      
      Change-Id: Iccdb99c37c797ef1f804a94b22ba5ee4b500c4f7
      Reviewed-on: https://go-review.googlesource.com/20022Reviewed-by: default avatarRob Pike <r@golang.org>
      Reviewed-by: default avatarDave Day <djd@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      5fea2ccc
  9. 01 Mar, 2016 1 commit
  10. 29 Feb, 2016 1 commit
    • Brad Fitzpatrick's avatar
      all: remove public named return values when useless · 351c15f1
      Brad Fitzpatrick authored
      Named returned values should only be used on public funcs and methods
      when it contributes to the documentation.
      
      Named return values should not be used if they're only saving the
      programmer a few lines of code inside the body of the function,
      especially if that means there's stutter in the documentation or it
      was only there so the programmer could use a naked return
      statement. (Naked returns should not be used except in very small
      functions)
      
      This change is a manual audit & cleanup of public func signatures.
      
      Signatures were not changed if:
      
      * the func was private (wouldn't be in public godoc)
      * the documentation referenced it
      * the named return value was an interesting name. (i.e. it wasn't
        simply stutter, repeating the name of the type)
      
      There should be no changes in behavior. (At least: none intended)
      
      Change-Id: I3472ef49619678fe786e5e0994bdf2d9de76d109
      Reviewed-on: https://go-review.googlesource.com/20024
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarAndrew Gerrand <adg@golang.org>
      351c15f1
  11. 15 Dec, 2015 1 commit
    • Brad Fitzpatrick's avatar
      net: add Dialer.Cancel to cancel pending dials · 24a83d35
      Brad Fitzpatrick authored
      Dialer.Cancel is a new optional <-chan struct{} channel whose closure
      indicates that the dial should be canceled. It is compatible with the
      x/net/context and http.Request.Cancel types.
      
      Tested by hand with:
      
      package main
      
          import (
                  "log"
                  "net"
                  "time"
          )
      
          func main() {
                  log.Printf("start.")
                  var d net.Dialer
                  cancel := make(chan struct{})
                  time.AfterFunc(2*time.Second, func() {
                          log.Printf("timeout firing")
                          close(cancel)
                  })
                  d.Cancel = cancel
                  c, err := d.Dial("tcp", "192.168.0.1:22")
                  if err != nil {
                          log.Print(err)
                          return
                  }
                  log.Fatalf("unexpected connect: %v", c)
          }
      
      Which says:
      
          2015/12/14 22:24:58 start.
          2015/12/14 22:25:00 timeout firing
          2015/12/14 22:25:00 dial tcp 192.168.0.1:22: operation was canceled
      
      Fixes #11225
      
      Change-Id: I2ef39e3a540e29fe6bfec03ab7a629a6b187fcb3
      Reviewed-on: https://go-review.googlesource.com/17821Reviewed-by: default avatarRuss Cox <rsc@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      24a83d35
  12. 11 Dec, 2015 1 commit
  13. 13 Jun, 2015 1 commit
  14. 29 Apr, 2015 1 commit
    • Mikio Hara's avatar
      net: add Source field to OpError · afd2d2b6
      Mikio Hara authored
      Not only by network, transport-layer intermediaries but by
      virtualization stuff in a node, it is hard to identify the root cause of
      weird faults without information of packet flows after disaster
      happened.
      
      This change adds Source field to OpError to be able to represent a
      5-tuple of internet transport protocols for helping dealing with
      complicated systems.
      
      Also clarifies the usage of Source and Addr fields.
      
      Updates #4856.
      
      Change-Id: I96a523fe391ed14406bfb21604c461d4aac2fa19
      Reviewed-on: https://go-review.googlesource.com/9231Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      afd2d2b6
  15. 21 Apr, 2015 2 commits
  16. 18 Apr, 2015 4 commits
  17. 10 Apr, 2015 1 commit
    • Paul Marks's avatar
      net: make multi-IP resolution more flexible. · a5dec385
      Paul Marks authored
      Remove the "netaddr" type, which ambiguously represented either one
      address, or a list of addresses. Instead, use "addrList" wherever
      multiple addresses are supported.
      
      The "first" method returns the first address matching some condition
      (e.g. "is it IPv4?"), primarily to support legacy code that can't handle
      multiple addresses.
      
      The "partition" method splits an addrList into two categories, as
      defined by some strategy function. This is useful for implementing
      Happy Eyeballs, and similar two-channel algorithms.
      
      Finally, internetAddrList (formerly resolveInternetAddr) no longer
      mangles the ordering defined by getaddrinfo. In the future, this may
      be used by a sequential Dial implementation.
      
      Updates #8453, #8455.
      
      Change-Id: I7375f4c34481580ab40e31d33002a4073a0474f3
      Reviewed-on: https://go-review.googlesource.com/8360Reviewed-by: default avatarMikio Hara <mikioh.mikioh@gmail.com>
      Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      a5dec385
  18. 06 Feb, 2015 1 commit
  19. 08 Sep, 2014 1 commit
  20. 04 Aug, 2014 1 commit
  21. 04 Apr, 2014 1 commit
  22. 03 Apr, 2014 1 commit
  23. 02 Apr, 2014 1 commit
  24. 25 Feb, 2014 2 commits
    • Dave Cheney's avatar
      all: merge NaCl branch (part 1) · 7c8280c9
      Dave Cheney authored
      See golang.org/s/go13nacl for design overview.
      
      This CL is the mostly mechanical changes from rsc's Go 1.2 based NaCl branch, specifically 39cb35750369 to 500771b477cf from https://code.google.com/r/rsc-go13nacl. This CL does not include working NaCl support, there are probably two or three more large merges to come.
      
      CL 15750044 is not included as it involves more invasive changes to the linker which will need to be merged separately.
      
      The exact change lists included are
      
      15050047: syscall: support for Native Client
      15360044: syscall: unzip implementation for Native Client
      15370044: syscall: Native Client SRPC implementation
      15400047: cmd/dist, cmd/go, go/build, test: support for Native Client
      15410048: runtime: support for Native Client
      15410049: syscall: file descriptor table for Native Client
      15410050: syscall: in-memory file system for Native Client
      15440048: all: update +build lines for Native Client port
      15540045: cmd/6g, cmd/8g, cmd/gc: support for Native Client
      15570045: os: support for Native Client
      15680044: crypto/..., hash/crc32, reflect, sync/atomic: support for amd64p32
      15690044: net: support for Native Client
      15690048: runtime: support for fake time like on Go Playground
      15690051: build: disable various tests on Native Client
      
      LGTM=rsc
      R=rsc
      CC=golang-codereviews
      https://golang.org/cl/68150047
      7c8280c9
    • Aram Hăvărneanu's avatar
      runtime, net: add support for GOOS=solaris · 50df1364
      Aram Hăvărneanu authored
      LGTM=dave, rsc
      R=golang-codereviews, minux.ma, mikioh.mikioh, dave, iant, rsc
      CC=golang-codereviews
      https://golang.org/cl/36030043
      50df1364
  25. 29 Jan, 2014 1 commit
  26. 24 Sep, 2013 1 commit
  27. 06 Sep, 2013 1 commit
  28. 30 Aug, 2013 1 commit
    • Mikio Hara's avatar
      net: add netaddr interface · 3c6558ad
      Mikio Hara authored
      This CL adds the netaddr interface that will carry a single network
      endpoint address or a short list of IP addresses to dial helper
      functions in the upcoming CLs.
      
      This is in preparation for TCP connection setup with fast failover on
      dual IP stack node as described in RFC 6555.
      
      Update #3610
      Update #5267
      
      R=golang-dev, bradfitz
      CC=golang-dev
      https://golang.org/cl/13368044
      3c6558ad
  29. 28 Aug, 2013 1 commit
  30. 23 Aug, 2013 1 commit
  31. 22 Aug, 2013 1 commit
    • Mikio Hara's avatar
      net: remove redundant argument check from Dial on udp, unix networks · 3b961bf8
      Mikio Hara authored
      The net package consists of thin three layers like the follwoing;
      
      - Exposed API, that contains net.Dial, net.DialUDP, net.DialUnix
      - Socket and network file descriptor, that contains net.netFD and
        its methods, helper functions such as dialUDP, dialUnix
      - Network pollster, that contains net.pollDesc and its methods
      
      This CL removes redundant argument check which is already done by
      API layer.
      
      R=golang-dev, dave, bradfitz
      CC=golang-dev
      https://golang.org/cl/13092043
      3b961bf8
  32. 18 Aug, 2013 1 commit
  33. 15 Aug, 2013 1 commit
    • Mikio Hara's avatar
      net: rearrange the call order of runtime-integrated network pollster and syscall functions · 5d5defc7
      Mikio Hara authored
      This CL rearranges the call order for raw networking primitives like
      the following;
      
      - For dialers that open active connections, pollDesc.Init will be
        called before syscall.Connect.
      
      - For stream listeners that open passive stream connections,
        pollDesc.Init will be called just after syscall.Listen.
      
      - For datagram listeners that open datagram connections,
        pollDesc.Init will be called just after syscall.Bind.
      
      This is in preparation for runtime-integrated network pollster for BSD
      variants.
      
      Update #5199
      
      R=golang-dev, alex.brainman
      CC=golang-dev
      https://golang.org/cl/12730043
      5d5defc7
  34. 13 Aug, 2013 1 commit