#ifndef _RTPCOMMON_H_ #define _RTPCOMMON_H_ #include #include /** * @brief 接收到的客户端结构体 * */ struct RtpRecvClientInfo_t { char clientIP[32]; /* 客户端IP */ int clientPort; /* 客户端接收数据的UDP端口 */ int sessionID; /* 连接的SessionID */ char sessionName[32]; /* 客户端名称 */ int type; /* 包类型,0:Login,1:Heart,2:Logout */ RtpRecvClientInfo_t(); RtpRecvClientInfo_t(const RtpRecvClientInfo_t& other); RtpRecvClientInfo_t& operator=(const RtpRecvClientInfo_t& other); }; /** * @brief RTP通道包含带有UDP信息的客户端信息 * */ struct RtpSendClientInfo_t { int localPort; /* 本地发送数据的UDP端口 */ QString clientIP; /* 客户端IP */ int clientPort; /* 客户端接收数据的UDP端口 */ int sessionID; /* 连接的SessionID */ QString sessionName; /* 客户端名称 */ QUdpSocket* udpSocket = nullptr; /* 用于发送数据的UDP套接字 */ RtpSendClientInfo_t(); RtpSendClientInfo_t(const RtpSendClientInfo_t& other); RtpSendClientInfo_t& operator=(const RtpSendClientInfo_t& other); }; #endif /* _RTPCOMMON_H_ */