[Strmod-devel] Question about multicast design in StrMod
Status: Alpha
Brought to you by:
omnifarious
|
From: Jim H. <jh...@iu...> - 2004-05-04 19:12:33
|
Hi Eric,
I'm doing the design today on adding multicast support to StrMod.
If a proper design isn't too bad, I'll do it correct right away.
Otherwise at least for my presentation this Friday, I'll do it in a
quick temporary way. If I have to resort to that, then I will implement
it correctly after this week, so don't worry at all. :) I'm thinking
that there are two ways to do this.
First, I could create 2 UDPSocketModules, one for sending and one
for receiving (the explanation of a program that does both in the Unix
Network Programming book says that there needs to be two different
sockets to both send and receive multicast messages on if you bind to an
address). I could then have a member function that would set each
UDPSocketModule to join a given multicast interface and group. This
seems like the quickest way, but it really doesn't add multicast support
to StrMod in a very C++ way. It's more like a functional C way.
So my second thought is to create a new derived class from
UDPSocketModule called MCastSocketModule which would simply override the
parts of the UDPSocketModule that need to be to implement multicasting.
My thought then was to create the two UDP sockets within
MCastSocketModule that would do the sending and receiving specifically.
My question is, if this is the correct approach in your opinion to
implement multicasting, with the two sockets in the one class for
sending and receiving, can this be done without using threads? Will it
work just fine by creating non-blocking socket descriptors?
Thanks!
Jim Hodapp
--
Full-time student of Electrical Engineering
Purdue School of Engineering @ Indiana University Purdue University Indianapolis
|