diff --git a/gee-rpc/day5-http-debug/client.go b/gee-rpc/day5-http-debug/client.go index e9b4540..795a18b 100644 --- a/gee-rpc/day5-http-debug/client.go +++ b/gee-rpc/day5-http-debug/client.go @@ -306,7 +306,9 @@ func DialHTTP(network, address string, opts ...*Option) (*Client, error) { return dialTimeout(dialHTTP, network, address, opts...) } -// XDial use a general format to represent a rpc server +// XDial calls different functions to connect to a RPC server +// according the first parameter rpcAddr. +// rpcAddr is a general format (protocol@addr) to represent a rpc server // eg, http@10.0.0.1:7001, tcp@10.0.0.1:9999, unix@/tmp/geerpc.sock func XDial(rpcAddr string, opts ...*Option) (*Client, error) { parts := strings.Split(rpcAddr, "@") diff --git a/gee-rpc/day6-load-balance/client.go b/gee-rpc/day6-load-balance/client.go index e9b4540..795a18b 100644 --- a/gee-rpc/day6-load-balance/client.go +++ b/gee-rpc/day6-load-balance/client.go @@ -306,7 +306,9 @@ func DialHTTP(network, address string, opts ...*Option) (*Client, error) { return dialTimeout(dialHTTP, network, address, opts...) } -// XDial use a general format to represent a rpc server +// XDial calls different functions to connect to a RPC server +// according the first parameter rpcAddr. +// rpcAddr is a general format (protocol@addr) to represent a rpc server // eg, http@10.0.0.1:7001, tcp@10.0.0.1:9999, unix@/tmp/geerpc.sock func XDial(rpcAddr string, opts ...*Option) (*Client, error) { parts := strings.Split(rpcAddr, "@") diff --git a/gee-rpc/day7-registry/client.go b/gee-rpc/day7-registry/client.go index e9b4540..795a18b 100644 --- a/gee-rpc/day7-registry/client.go +++ b/gee-rpc/day7-registry/client.go @@ -306,7 +306,9 @@ func DialHTTP(network, address string, opts ...*Option) (*Client, error) { return dialTimeout(dialHTTP, network, address, opts...) } -// XDial use a general format to represent a rpc server +// XDial calls different functions to connect to a RPC server +// according the first parameter rpcAddr. +// rpcAddr is a general format (protocol@addr) to represent a rpc server // eg, http@10.0.0.1:7001, tcp@10.0.0.1:9999, unix@/tmp/geerpc.sock func XDial(rpcAddr string, opts ...*Option) (*Client, error) { parts := strings.Split(rpcAddr, "@")