Integrates with the pollserver now.
Uses the old implementation on windows and plan9.
Fixes#2631
R=paul, iant, adg, bendaglish, rsc
CC=golang-dev
https://golang.org/cl/6815049
All tests enabled by default passes except those in timeout_test.go.
For TestLookupPort, add an entry for "bootps" in /lib/ndb/common
(Plan 9 calls it "bootp"). I've sent out a patch to fix this.
R=paulzhol, rsc, mikioh.mikioh
CC=ality, golang-dev
https://golang.org/cl/4779041
This is a core API change.
1) gofix misc src
2) Manual adjustments to the following files under src/pkg:
gob/decode.go
rpc/client.go
os/error.go
io/io.go
bufio/bufio.go
http/request.go
websocket/client.go
as well as:
src/cmd/gofix/testdata/*.go.in (reverted)
test/fixedbugs/bug243.go
3) Implemented gofix patch (oserrorstring.go) and test case (oserrorstring_test.go)
Compiles and runs all tests.
R=r, rsc, gri
CC=golang-dev
https://golang.org/cl/4607052
Add IPv6Mreq and Inet6Pktinfo for specifying the network interface.
Rename IpMreq to IPMreq, SetsockoptIpMreq to SetsockoptIPMreq.
R=rsc, dave, robert.hencke
CC=golang-dev
https://golang.org/cl/4532098
This CL will help to make an adaptive address family
selection possible when an any address family, vague
network string such as "ip", "tcp" or "udp" is passed
to Dial and Listen API.
Fixes#1769.
R=bradfitz, rsc
CC=golang-dev
https://golang.org/cl/4438066
This CL makes it possible to resolve DNS names on OS X
without offending the Application-Level Firewall.
It also means that cross-compiling from one operating
system to another is no longer possible when using
package net, because cgo needs to be able to sniff around
the local C libraries. We could special-case this one use
and check in generated files, but it seems more trouble
than it's worth. Cross compiling is dead anyway.
It is still possible to use either GOARCH=amd64 or GOARCH=386
on typical Linux and OS X x86 systems.
It is also still possible to build GOOS=linux GOARCH=arm on
any system, because arm is for now excluded from this change
(there is no cgo for arm yet).
R=iant, r, mikioh
CC=golang-dev
https://golang.org/cl/4437053
Drop laddr argument from Dial.
Drop cname return from LookupHost.
Add LookupIP, LookupCNAME, ParseCIDR, IP.Equal.
Export SplitHostPort, JoinHostPort.
Add AAAA (IPv6) support to host lookups.
Preparations for implementing some of the
lookups using cgo.
ParseCIDR and IP.Equal are logically new in this CL
but accidentally snuck into an earlier CL about unused
labels that was in the same client.
In crypto/tls, drop laddr from Dial to match net.
R=golang-dev, dsymonds, adg, rh
CC=golang-dev
https://golang.org/cl/4244055
notes:
Darwin is very particular about joining a multicast group if the
listneing socket is not created in "udp4" mode, the other supported
OS's are more flexible.
A simple example sets up a socket to listen on the mdns/bonjour
group 224.0.0.251:5353
// ensure the sock is udp4, and the IP is a 4 byte IPv4
socket, err := net.ListenUDP("udp4", &net.UDPAddr {
IP: net.IPv4zero,
// currently darwin will not allow you to bind to
// a port if it is already bound to another process
Port: 5353,
})
if err != nil {
log.Exitf("listen %s", err)
}
defer socket.Close()
err = socket.JoinGroup(net.IPv4(224, 0, 0, 251))
if err != nil {
log.Exitf("join group %s", err)
}
R=adg, rsc
CC=golang-dev
https://golang.org/cl/4066044
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#442.
R=r
CC=golang-dev, msolo
https://golang.org/cl/957045
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
https://golang.org/cl/180048
- 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
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