Next: , Previous: Receiving Data, Up: RTP Sessions

4.1.4 Closing Sessions

RTP sessions can be closed deleting or destroying RTPSession objects. The stack sends a BYE packet to every destination when the destructor of sessions is called. It is also possible to explicitly send a BYE packet through the dispatchBYE method, which takes the leaving reason string as argument. Note that dispatchBYE will honor a number of rules for sending BYE packets specified in the RTP standard: a BYE packet is not sent if no RTP/RTCP packet was sent, and BYE floods avoiding mechanisms are employed.

Note that when a BYE RTCP packet is received from a remote participant, the virtual onGotGoodbye will be called.