summaryrefslogtreecommitdiff
path: root/src/pkg/net/fd.go
AgeCommit message (Collapse)AuthorFilesLines
2011-09-13Imported Upstream version 60upstream/60Ondřej Surý1-0/+645
2011-09-13Imported Upstream version 60Ondřej Surý1-639/+0
2011-04-26Imported Upstream version 2011.04.13upstream/2011.04.13Ondřej Surý1-45/+67
2011-02-14Imported Upstream version 2011-02-01.1upstream/2011-02-01.1Ondřej Surý1-6/+11
2011-01-17Imported Upstream version 2011.01.12upstream/2011.01.12Ondřej Surý1-3/+96
2010-06-29Move the function Run() back into fd.go.Vinu Rajashekhar1-0/+44
R=iant CC=golang-dev, rsc http://codereview.appspot.com/1748041 Committer: Ian Lance Taylor <iant@golang.org>
2010-06-28Move the functions, newPollServer and Run, from fd.goVinu Rajashekhar1-75/+0
to a new source file. R=iant, rsc CC=golang-dev http://codereview.appspot.com/1670046 Committer: Ian Lance Taylor <iant@golang.org>
2010-05-27changes &x -> x[0:] for array to slice conversionRuss Cox1-3/+3
R=gri CC=golang-dev http://codereview.appspot.com/1326042
2010-05-20netFD: fix race between Close and Read/WriteMichael Hoisie1-2/+9
Fixes issue 783. R=rsc, cw CC=golang-dev http://codereview.appspot.com/1207043 Committer: Russ Cox <rsc@golang.org>
2010-04-26net: introduce net.Error interfaceRuss Cox1-23/+43
Adds two more methods, Timeout and Temporary. Implemented by os.Errno too. The intent is to make the checks for os.EAGAIN a little less clunky. It should also let us clean up a bug that Mike Solomon pointed out: if a network server gets an "out of file descriptors" error from Accept, the listener should not stop. It will be able to check this because that error would have Temporary() == true. Also clean up some underscore names. Fixes issue 442. R=r CC=golang-dev, msolo http://codereview.appspot.com/957045
2010-04-06net: use chan bool instead of chan *netFD to avoid cycleRuss Cox1-8/+8
The cycle is *netFD -> cw chanl *netFD in struct -> same *netFD in channel read buffer. Because channels are finalized, the cycle makes them uncollectable. A better fix is to make channels not finalized anymore, and that will happen, but this is an easy, reasonable workaround until then. Another good fix would be to zero the channel receive buffer entry after the receive. That too will happen. R=r CC=golang-dev http://codereview.appspot.com/875043
2010-03-30single argument panicRuss Cox1-6/+2
note that sortmain.go has been run through hg gofmt; only the formatting of the day initializers changed. i'm happy to revert that formatting if you'd prefer. stop on error in doc/progs/run R=r CC=golang-dev http://codereview.appspot.com/850041
2010-03-24delete all uses of panicln by rewriting them using panic or,Rob Pike1-1/+1
in the tests, println+panic. gofmt some tests too. R=rsc CC=golang-dev http://codereview.appspot.com/741041
2010-03-03net: fix network timeout boundary condition.Stephen Ma1-1/+1
Fixes issue 472. R=golang-dev CC=golang-dev http://codereview.appspot.com/223108
2010-03-02gofmt: experiment: align values in map composites where possibleRobert Griesemer1-5/+5
- gofmt -w src misc - looking for feedback R=rsc, r CC=golang-dev http://codereview.appspot.com/223076
2009-12-151) Change default gofmt default settings forRobert Griesemer1-180/+180
parsing and printing to new syntax. Use -oldparser to parse the old syntax, use -oldprinter to print the old syntax. 2) Change default gofmt formatting settings to use tabs for indentation only and to use spaces for alignment. This will make the code alignment insensitive to an editor's tabwidth. Use -spaces=false to use tabs for alignment. 3) Manually changed src/exp/parser/parser_test.go so that it doesn't try to parse the parser's source files using the old syntax (they have new syntax now). 4) gofmt -w src misc test/bench 3rd set of files. R=rsc CC=golang-dev http://codereview.appspot.com/180048
2009-12-02net: test and fix support for 0-length datagram packets.Russ Cox1-1/+7
Fixes issue 274. R=r CC=jonathan.r.hudson http://codereview.appspot.com/163072 Committer: Russ Cox <rsc@golang.org>
2009-12-01net: fix netFD.Close racesDevon H. O'Dell1-61/+72
Fixes issue 271. Fixes issue 321. R=rsc, agl, cw CC=golang-dev http://codereview.appspot.com/163052 Committer: Russ Cox <rsc@golang.org>
2009-11-20gofmt -r 'α[β:len(α)] -> α[β:]' -w src/cmd src/pkgRuss Cox1-1/+1
R=r, gri CC=golang-dev http://codereview.appspot.com/156115
2009-11-18net: remove race condition on Close.Adam Langley1-16/+31
Previously a netFd could be queued for reading/writing in the channel, but close(2)'ed before pollServer got to it. In this case, the kernel would consider the descriptor closed and the attempt to add it to the epoll set would fail and panic. This patch makes Close a roundtrip to the pollServer, although the actual close(2) still occurs elsewhere to avoid blocking the pollServer. Fixes issue 143. R=rsc CC=golang-dev http://codereview.appspot.com/152130 Committer: Adam Langley <agl@golang.org>
2009-11-17net: enforce timeouts for ReadFrom/WriteToRuss Cox1-0/+56
Fixes issue 153. R=r http://codereview.appspot.com/154177
2009-11-09- replaced gofmt expression formatting algorithm withRobert Griesemer1-3/+3
rsc's algorithm - applied gofmt -w misc src - partial CL (last chunk) R=rsc, r http://go/go-review/1024041
2009-11-09remove semis after statements in one-statement statement listsRobert Griesemer1-34/+34
R=rsc, r http://go/go-review/1025029
2009-11-06- fine-tuning of one-line func heuristic (nodes.go)Robert Griesemer1-3/+1
- enabled for function declarations (not just function literals) - applied gofmt -w $GOROOT/src (look for instance at src/pkg/debug/elf/elf.go) R=r, rsc CC=go-dev http://go/go-review/1026006
2009-11-04gofmt-ify netRobert Griesemer1-60/+61
R=rsc http://go/go-review/1017045
2009-11-02package net cleanupRuss Cox1-40/+28
added ReadFrom/WriteTo for packet protocols like UDP. simplified the net.Conn interface. added new net.PacketConn interface for packet protocols. implemented proper UDP listener. cleaned up LocalAddr/RemoteAddr methods - cache in netFD. threw away various unused methods. an interface change: introduced net.Addr as a network address interface, to avoid conversion of UDP host:port to string and back for every ReadFrom/WriteTo sequence. another interface change: since signature of Listener.Accept was changing anyway, dropped the middle return value, because it is available as c.RemoteAddr(). (the Accept signature predates the existence of that method.) Dial and Listen still accept strings, but the proto-specific versions DialTCP, ListenUDP, etc. take net.Addr instead. because the generic Dial didn't change and because no one calls Accept directly (only indirectly via the http server), very little code will be affected by these interface changes. design comments welcome. R=p CC=go-dev, r http://go/go-review/1018017
2009-09-15more "declared and not used".Russ Cox1-4/+4
the last round omitted := range and only checked 1 out of N vars in a multi-var := R=r OCL=34624 CL=34638
2009-08-12convert non-low-level non-google pkg codeRuss Cox1-4/+0
to whole-package compilation. R=r OCL=33070 CL=33101
2009-06-25Change os.Error convention:Russ Cox1-34/+42
echo back context of call in error if likely to be useful. For example, if os.Open("/etc/passwd", os.O_RDONLY) fails with syscall.EPERM, it returns as the os.Error &PathError{ Op: "open", Path: "/etc/passwd" Error: os.EPERM } which formats as open /etc/passwd: permission denied Not converted: datafmt go/... google/... regexp tabwriter template R=r DELTA=1153 (561 added, 156 deleted, 436 changed) OCL=30738 CL=30781
2009-06-19make IP address availableRob Pike1-0/+10
R=rsc DELTA=30 (30 added, 0 deleted, 0 changed) OCL=30536 CL=30536
2009-06-17add Addr() string to net.Listener interface.Russ Cox1-0/+9
use it to avoid use of fixed ports in tests. convert google/net/rpc to gotest R=r DELTA=523 (275 added, 229 deleted, 19 changed) OCL=30458 CL=30460
2009-06-09mv src/lib to src/pkgRob Pike1-0/+429
tests: all.bash passes, gobuild still works, godoc still works. R=rsc OCL=30096 CL=30102