client.go
@@ -2,6 +2,7 @@ import ( "basic.com/valib/bhomebus.git" "errors" "fmt" "strconv" ) @@ -53,6 +54,16 @@ } } var busReq = func(req []byte,nodes []bhomebus.NetNode) ([]byte, error) { return nil, errors.New("please init InitDoReq first") } func InitDoReq(fn func([]byte, []bhomebus.NetNode) ([]byte, error)) { if fn != nil { busReq = fn } } func url2Topic(serviceName string, url string) string { return url }