gaizhengshanchudiaoxianjinchengkeydebug
| | |
| | | |
| | | // sub使用一个socket |
| | | sockSub := OpenDgramSocket() |
| | | sockSub.Bind(int(regReply.SubTopicKey)) |
| | | // sockSub.Bind(int(regReply.SubTopicKey)) |
| | | // 订阅主题 |
| | | for _, v := range info.SubTopic { |
| | | sockSub.Sub(v, int(regReply.SubTopicKey)) |
| | | } |
| | | // 启动接收线程 |
| | | go recvRoutine(ctx, sockSub, chSub) |
| | | sub := &subOReply{ |
| | |
| | | |
| | | // GetTopicInfo get topic info |
| | | func (h *Handle) GetTopicInfo(topic, typ string) int { |
| | | // 据说不更新,先用缓存,否则需要新创建一个socket,来从manager请求key |
| | | // ***k |
| | | if v, ok := h.m[topic]; ok { |
| | | return v.sock.Port() |
| | | } |
| | |
| | | return errors.New("C SoftBus Handle Is Nil") |
| | | } |
| | | if len(keys) == 0 { |
| | | return errors.New("Live Queue Keys Is Nil") |
| | | C.wrap_fn_shm_rm_dead_queue(libsoftbus, nil, 0) |
| | | return nil |
| | | } |
| | | |
| | | l := len(keys) |