How do you use "QUdpSocket::leaveMulticastGroup" ?
Hello. I recently search the multicast because I have to use the multicast in my developing app.
But I don't understand the leaveMulticastGroup in the multicast when I read the Qt document. And I couldn't find any samples for the leaveMulticastGroup.
I am interested in the leaveMulticastGroup.
Could you tell me how to use it and which situation to use it ?
Poor English last edited by
sorry, i do not understand the specific usage of "leaveMuliicastGroup",but I can search for the definition of multicast:
The original intention of multicast technology is to send information to a target group in the form of "best effort" in the IP netword,this target group is called a multicast group, so when then source host sends information to the multipoint target host, the source host only sends a copy of data, and the destination address of the data is multicast group address. In this way,all members of the group can receive a copy of the data sent by the source host. In this multicast mode, only the real Members who need the information will receive the information, but other hosts will not
@morita Did you also read https://doc.qt.io/qt-5/qudpsocket.html#joinMulticastGroup ?
@Poor-English Thak you for your reply. I study the multicast . But I would be happy if you tell me the specific usage of ""leaveMulticastGroup".
@jsulm Yes. I read the document. But I didn't understand it . I read it means "it Leaves the multicast group specified by groupAddress on the default interface chosen by the operating system." But I didn't understand what it "Leaves". Which case do we use this function , in case of sending or in case of recieving ?
@morita I was talking about https://doc.qt.io/qt-5/qudpsocket.html#joinMulticastGroup , not leaveMulticastGroup
See also https://tldp.org/HOWTO/Multicast-HOWTO-2.html
@jsulm Thank you for giving me the documents. I also read the URL about the joinMulticastGroup. And after reading your second document , I finally understood the leaveMulticastGroup.