liuxiaolong
2021-08-31 418bc6e7c106326796e2abaf04a8a5066daa57ee
client.go
@@ -1,7 +1,7 @@
package bhomedbapi
import (
   "basic.com/valib/bhomebus.git"
   "basic.com/valib/c_bhomebus.git/proto/source/bhome_msg"
   "errors"
   "fmt"
   "strconv"
@@ -44,21 +44,21 @@
   }
}
var getNetNode = func(topic string) []bhomebus.NetNode{
var getNetNode = func(topic string) []*bhome_msg.MsgQueryTopicReply_BHNodeAddress{
   return nil
}
func InitGetNetNode(fn func(name string)[]bhomebus.NetNode) {
   if fn != nil {
      getNetNode = fn
   }
func InitGetNetNode(fn func(name string)[]*bhome_msg.MsgQueryTopicReply_BHNodeAddress) {
   //if fn != nil {
   //   getNetNode = fn
   //}
}
var busReq = func(req []byte,nodes []bhomebus.NetNode) ([]byte, error) {
var busReq = func(req *bhome_msg.MsgRequestTopic,dest []*bhome_msg.MsgQueryTopicReply_BHNodeAddress) ([]byte, error) {
   return nil, errors.New("please init InitDoReq first")
}
func InitDoReq(fn func([]byte, []bhomebus.NetNode) ([]byte, error)) {
func InitDoReq(fn func(*bhome_msg.MsgRequestTopic, []*bhome_msg.MsgQueryTopicReply_BHNodeAddress) ([]byte, error)) {
   if fn != nil {
      busReq = fn
   }