Re: Multicasting Question
Re: Multicasting Question
- Subject: Re: Multicasting Question
- From: Aaron Ballman <email@hidden>
- Date: Wed, 29 Sep 2004 16:08:12 -0500
The SO_REUSEPORT socket option should let you bind multiple sockets to
the same port. The Stevens book should cover that. Look up
SO_REUSEPORT or SO_REUSEADDR in the index.
I've used that feature before -- forgot about it when posing my
question tho. ;-) The unfortunate part about that is, I was hoping to
avoid binding to the same port. I see exactly why it's needed when I
think about it logically though. I guess my main confusion comes from
the fact that POSIX sockets have a port field in the ip_mreq structure
for the group to join -- so I was thinking that you could just set the
port to Z for the group, and send all data to the group on port Z.
Then my two sockets on ports X and Y (having both joined the group "on"
port Z) would get all packets directed at the group's address with the
port set to Z. This way no two sockets are stuck on the same local
port, but all sockets can communicate via multicasting whether they are
on the same machine or not.
~Aaron
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden