[Live-devel] Questions about Groupsock
Finta Tartaruga
framefritti at gmail.com
Fri Sep 11 14:14:08 PDT 2009
Dear all,
for my final project I need to do few tests with an experimental
transport protocol. We decided to use the library live555 suitably
modified to include our experimental protocol. I studied the source
code for a while, especially the Groupsock part. I think I understood
it quite well, but still I feel a little bit unsure and I was
wondering if someone could confirm/refine/deny my "theories"
This is what I understood:
* Groupsock is a "socket-like" object for multicasting. Its
constructors receive the pair (multicast IP address, port) associated
to the multicast group, the constructor for the SSM case expects also
the IP addr of the source.
* The constructors create a socket which is bind()-ed to the multicast
port and joined to the multicast group. I would say that you can give
also a non-multicast address with the only consequence that the join
will fail.
* You can send packets to the address passed to the constructor by
using the method output().
* So far, so good... Now it comes the part a little bit more unclear:
the Destination list. I understand that it allows you to have a
"multi-unicast" (that is, you can send data to many hosts over several
unicast connections) and that the first element of the list is the
address given to the constructor. However, there is something that
leaves me "uneasy" since I cannot understand the motivations behind
some code; for example,
+ the method changeDestinationParameters() acts only on the first
destination of the list (which typically coincides with the address
given to the constructors unless you remove it via removeDestination)
and leaves the others unchanged. Am I maybe supposed to use
changeDestinationParameters() only with a single-destination
Groupsock?
+ the method groupAddress() returns the IP address stored in
fIncomingGroupEId which coincides with the address given to the
constructor. I would guess that it has the meaning of the IP address
of the multicast group we belong to since it is used, for example, to
create the SDP description. However, if I change group with
changeDestinationParameters(), I go to another multicast group, while
the value of fIncomingGroupEId remains the old one. If now a
PassiveServerMediaSubsession calls (inside sdpLines) the method
groupAddress() [to get the value to be used in the "c=" field of the
SDP description] it will get the old group address and not the new
one. Is this an unlikely-triggered bug or is this correct? (and why?)
Thank you in advance for your help
More information about the live-devel
mailing list