summaryrefslogtreecommitdiff
path: root/src/pkg/net
AgeCommit message (Collapse)AuthorFilesLines
2010-03-03net: put [ ] around IPv6 addresses for DialRuss Cox1-1/+5
Update issue 538. R=r CC=golang-dev http://codereview.appspot.com/229045
2010-03-03net: fix nil deref in testTimeout when Dial failsRuss Cox1-1/+2
Pointed out by Scott Schwartz. Fixes issue 637. R=scotts CC=golang-dev http://codereview.appspot.com/225042
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-03net: correct DNS configurationStephen Ma2-3/+3
Set defaults to the same values as various C DNS resolver libraries. Use the timeout value from the configuration. Fixes issue 632. R=rsc CC=golang-dev http://codereview.appspot.com/223094
2010-03-02gofmt: experiment: align values in map composites where possibleRobert Griesemer2-14/+14
- gofmt -w src misc - looking for feedback R=rsc, r CC=golang-dev http://codereview.appspot.com/223076
2010-02-25strings: delete Runes, BytesRuss Cox2-3/+2
gofmt -w -r 'strings.Bytes(a) -> []byte(a)' src/cmd src/pkg test/bench gofmt -w -r 'strings.Runes(a) -> []int(a)' src/cmd src/pkg test/bench delete unused imports R=r CC=golang-dev http://codereview.appspot.com/224062
2010-02-25Fix small typo in net package.Stephen Weinberg1-1/+1
R=rsc CC=golang-dev http://codereview.appspot.com/224061 Committer: Russ Cox <rsc@golang.org>
2010-02-22net: disable UDP server testRuss Cox1-3/+6
has been flaking on various architectures. not sure why, but doesn't seem to be Go's fault. Fixes issue 617. R=r CC=golang-dev http://codereview.appspot.com/217093
2010-02-10net: use slightly less predictable dns request idRuss Cox1-1/+3
not trying to be secure, just not repetitive (sending with the same id repeatedly makes some resolvers stop replying.) eventually we'll replace this with linking against the system's native resolver. R=p CC=golang-dev http://codereview.appspot.com/207051
2010-01-26net: fix segfault if /etc/hosts fails to open or doesn't existMichael Hoisie1-1/+3
R=rsc CC=golang-dev, r http://codereview.appspot.com/194043 Committer: Russ Cox <rsc@golang.org>
2010-01-25net: parse aliases in /etc/hosts correctlyAndrey Mirtchovski3-3/+13
Previous behaviour only picked the first entry (official hostname) but not the aliases. R=rsc CC=golang-dev http://codereview.appspot.com/193092 Committer: Russ Cox <rsc@golang.org>
2010-01-18net: enable UDP broadcast before it is needed (instead of after)Russ Cox2-5/+4
Fixes issue 526. R=r CC=golang-dev http://codereview.appspot.com/186211
2010-01-15Use /etc/hosts when resolving names.Yves Junqueira6-2/+148
http://code.google.com/p/go/issues/detail?id=313 This conflics with Chris' patch at: http://codereview.appspot.com/181063 But I believe this is more complete since it has a simple caching and proper tests. R=cw, rsc CC=golang-dev http://codereview.appspot.com/183066 Committer: Russ Cox <rsc@golang.org>
2010-01-05net: make Dial correctly return nil on error.Roger Peppe1-3/+15
R=rsc CC=golang-dev http://codereview.appspot.com/181135 Committer: Russ Cox <rsc@golang.org>
2009-12-151) Change default gofmt default settings forRobert Griesemer24-1249/+1249
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-09minor manual format correctionsRobert Griesemer1-2/+1
R=rsc http://codereview.appspot.com/172042
2009-12-04net: more fiddling with the udp test.Russ Cox1-1/+1
i don't know why the timeout needs to be so big. R=r http://codereview.appspot.com/165063
2009-12-03net: turn off empty packet test by defaultRuss Cox1-2/+9
Fixes issue 374. R=r http://codereview.appspot.com/166053
2009-12-02net: test and fix support for 0-length datagram packets.Russ Cox2-25/+39
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'Dell5-75/+98
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-30Added a method on UDPConn so they can actually send broadcast packets.Jonathan Wills1-1/+5
R=rsc http://codereview.appspot.com/162046 Committer: Russ Cox <rsc@golang.org>
2009-11-23go: makes it build for the case $GOROOT has whitespacesSergio Luis O. B. Correia1-2/+2
the bash scripts and makefiles for building go didn't take into account the fact $GOROOT / $GOBIN could both be directories containing whitespaces, and was not possible to build it in such a situation. this commit adjusts the various makefiles/scripts to make it aware of that possibility, and now it builds successfully when using a path with whitespaces as well. Fixes issue 115. R=rsc, dsymonds1 http://codereview.appspot.com/157067 Committer: Russ Cox <rsc@golang.org>
2009-11-20gofmt -r 'α[β:len(α)] -> α[β:]' -w src/cmd src/pkgRuss Cox8-12/+12
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 Cox5-23/+81
Fixes issue 153. R=r http://codereview.appspot.com/154177
2009-11-17FreeBSD-specific porting work.Devon H. O'Dell2-0/+110
cgo/libmach remain unimplemented. However, compilers, runtime, and packages are 100%. I still need to go through and implement missing syscalls (at least make sure they're all listed), but for all shipped functionality, this is done. Ship! ;) R=rsc, VenkateshSrinivas http://codereview.appspot.com/152142 Committer: Russ Cox <rsc@golang.org>
2009-11-10net: fix error for connect to /etc/ on some systemsRuss Cox1-1/+1
R=agl1 CC=golang-dev http://codereview.appspot.com/152051
2009-11-10net: disable more ipv6 testsRuss Cox1-6/+10
R=agl, agl1 CC=golang-dev http://codereview.appspot.com/153050
2009-11-10net: disable ipv6 test if we know kernel won't take it.Russ Cox1-1/+5
R=agl, agl1 CC=golang-dev http://codereview.appspot.com/153048
2009-11-10net: disable dns error testRuss Cox1-0/+7
some dns resolvers (opendns, for example) are willing to make up results for any name. R=agl, agl1 CC=golang-dev http://codereview.appspot.com/152049
2009-11-10net: fix dns bug reported on irc.Russ Cox2-1/+12
if suffixes don't work, check for name directly. also fixes short names like bit.ly when ndots>1. tested by tossing domain and search lines from /etc/resolv.conf Fixes issue 2. R=agl, agl1 CC=golang-dev http://codereview.appspot.com/152048
2009-11-09- replaced gofmt expression formatting algorithm withRobert Griesemer11-51/+51
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 Griesemer23-420/+420
R=rsc, r http://go/go-review/1025029
2009-11-08add top-level package comments for net, reflect, malloc.Rob Pike1-0/+3
reflect is a little more detailed than some because it affords an opportunity to explain how to approach the library. R=gri, rsc CC=go-dev http://go/go-review/1026026
2009-11-06- fine-tuning of one-line func heuristic (nodes.go)Robert Griesemer12-69/+23
- 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 Griesemer23-570/+569
R=rsc http://go/go-review/1017045
2009-11-04two more regexp tweaksRuss Cox1-2/+2
TBR=r http://go/go-review/1016037
2009-11-04allow "no such host" and also "no answer from server";Russ Cox1-1/+1
seems to help on snow leopard. TBR=r http://go/go-review/1018035
2009-11-02package net cleanupRuss Cox12-494/+1243
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-11-01split ipsock.go, sock.go, and unixsock.go out of net.goRuss Cox8-812/+868
prior to cleanup. no changes, only moving. remove dependencies on strconv and strings R=r http://go/go-review/1017010
2009-10-03expand error regexp in dns testRuss Cox1-3/+3
R=r DELTA=3 (0 added, 0 deleted, 3 changed) OCL=35292 CL=35303
2009-09-22nacl syscall package.Russ Cox1-0/+37
similar tweaks to make debug/proc, net, os build. R=r DELTA=861 (855 added, 4 deleted, 2 changed) OCL=34877 CL=34890
2009-09-17unused importsRuss Cox7-11/+1
R=r OCL=34731 CL=34731
2009-09-15final batch for "declared and not used"Russ Cox1-1/+1
* update mksyscall.sh and rebuild syscall/z*.go * fix a few linux-only files R=r DELTA=455 (12 added, 1 deleted, 442 changed) OCL=34637 CL=34655
2009-09-15more "declared and not used".Russ Cox6-11/+11
the last round omitted := range and only checked 1 out of N vars in a multi-var := R=r OCL=34624 CL=34638
2009-09-14fix "declared and not used" errors in non-test code.Russ Cox2-3/+0
R=r DELTA=112 (6 added, 57 deleted, 49 changed) OCL=34610 CL=34610
2009-08-27remove Line in bufio.ReadLine(Bytes|Slice|String)Russ Cox1-1/+4
also drop bool arg from ReadString R=r DELTA=45 (13 added, 1 deleted, 31 changed) OCL=33923 CL=33960
2009-08-12convert non-low-level non-google pkg codeRuss Cox17-115/+22
to whole-package compilation. R=r OCL=33070 CL=33101
2009-08-05support []byte (more efficient) as well as string in the interfaces.Rob Pike1-1/+1
change the names; Match is for []byte and MatchString is for string, etc. R=rsc DELTA=195 (155 added, 0 deleted, 40 changed) OCL=32800 CL=32800
2009-07-07net: use new reflect interface (CL 31107)Russ Cox2-129/+176
R=r DELTA=186 (55 added, 8 deleted, 123 changed) OCL=31117 CL=31287