testfastrtpstcprecv.cpp 531 B

123456789101112131415
  1. #include "testfastrtpstcprecv.h"
  2. testfastrtpstcprecv::testfastrtpstcprecv()
  3. {
  4. mpa = new iv::modulecommext::modulecommmsg<iv::testmodulecommext>();
  5. ModuleExtFun funext = std::bind(&testfastrtpstcprecv::ListenMsg,this,std::placeholders::_1);
  6. mpa->RegisterRecvPlus("test",funext,iv::modulecomm::ModuleComm_FASTRTPS_TCP,"192.168.14.98",5101);
  7. }
  8. void testfastrtpstcprecv::ListenMsg(google::protobuf::Message &xmsg)
  9. {
  10. iv::testmodulecommext xdata;
  11. xdata.CopyFrom(xmsg);
  12. qDebug("rtps_tcp: %lld",xdata.time());
  13. }