net: drop laddr from Dial, cname from LookupHost; new functions
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
This commit is contained in:
parent
dc6468fcf1
commit
9fe949aa97
@ -50,7 +50,7 @@ func TestRunClient(t *testing.T) {
|
||||
|
||||
testConfig.CipherSuites = []uint16{TLS_ECDHE_RSA_WITH_RC4_128_SHA}
|
||||
|
||||
conn, err := Dial("tcp", "", "127.0.0.1:10443", testConfig)
|
||||
conn, err := Dial("tcp", "127.0.0.1:10443", testConfig)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
5
tls.go
5
tls.go
@ -87,8 +87,9 @@ func Listen(network, laddr string, config *Config) (*Listener, os.Error) {
|
||||
// Dial interprets a nil configuration as equivalent to
|
||||
// the zero configuration; see the documentation of Config
|
||||
// for the defaults.
|
||||
func Dial(network, laddr, raddr string, config *Config) (*Conn, os.Error) {
|
||||
c, err := net.Dial(network, laddr, raddr)
|
||||
func Dial(network, addr string, config *Config) (*Conn, os.Error) {
|
||||
raddr := addr
|
||||
c, err := net.Dial(network, raddr)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user