ByteXiaoTang

Results 10 issues of ByteXiaoTang

![image](https://user-images.githubusercontent.com/32772277/104552837-7e4b6f00-5674-11eb-9d41-1dfcee47c397.png) i may not understand why _unicast_flag is false, then send_unicast_offer_service.

![image](https://user-images.githubusercontent.com/32772277/118101026-b9cf2d80-b409-11eb-8d07-a1fa6434328a.png) suggest not use condition_variable wait_for which will affect by system time change

![image](https://user-images.githubusercontent.com/32772277/112446596-56bb0600-8d8b-11eb-86d2-287d8d86a3b0.png) found_service_msg should change to false when find one

in sd, check_ipv4_address function, two static should be removed. ![image](https://user-images.githubusercontent.com/32772277/111256788-d131aa80-8654-11eb-8346-f56927641096.png) because i meet one problem. although i can not understand why. ![image](https://user-images.githubusercontent.com/32772277/111256868-04743980-8655-11eb-9d75-172e17351c3e.png)

![image](https://user-images.githubusercontent.com/32772277/108940446-51847180-768e-11eb-81de-6d2938811eff.png) here, we get port error, but we still use its_value, the value we may not expect.

Fdubs跨域是点对点服务通信,中间的nameserver只做了服务发现。缺陷在于服务太多时,通信效率会降低,尤其是在服务提供者提供服务,订阅者偏多时。这就是服务网关存在的意义。 对比vsomeip,跨域通信都经过stub中转,订阅单位基于ip, 订阅量会大幅降低,配合field机制,通信量会少许多。虽然链路好像会长一点。 但经过比对测试,在5ms通信以下级别,fdbus通信负载比vsomeip负载大的多。

the CBaseLoopTimer may has problem. 程序有需求,消息来时创建timer指针,得到回复之后就delete指针。 这样来回new和delete大概几百次之后,就会引起程序cordump.

![image](https://user-images.githubusercontent.com/32772277/118092970-59d38980-b3ff-11eb-9734-ab40916dbde2.png) ![image](https://user-images.githubusercontent.com/32772277/118093047-740d6780-b3ff-11eb-8e55-702ce694575b.png) use condition_variable which use steady time also may affect by system time change

msg_ref为智能指针,但是被捕获切换线程处理,好像已经被删除,为空。 后来只能如下处理,将其中的值先取出,赋给buffer CBaseMessage *msg = castToMessage(msg_ref); if (nullptr != msg) { std::shared_ptr buffer(std::make_shared()); buffer->assign((char *)(msg->getPayloadBuffer()), msg->getPayloadSize()); int32_t code = msg->code(); } });

sem_timedwait use CLOCK_REALTIME time, which may change when system time change. so timewait will have problem.