Re: [gnet] specifying the interface for gnet_mcast_socket_new
- From: David Helder <dhelder umich edu>
- To: Shaun Jackman <sjackman pathwayconnect com>
- Cc: <gnet gnetlibrary org>
- Subject: Re: [gnet] specifying the interface for gnet_mcast_socket_new
- Date: Wed, 3 Oct 2001 14:47:24 -0400 (EDT)
Use gnet_mcast_socket_inetaddr_new (const GInetAddr* ia)
David
On Wed, 3 Oct 2001, Shaun Jackman wrote:
> I need to open a listening multicast socket on a specific interface, so that
> the IGMP packets will originate out of only that interface. Currently, there
> does not seem to be a way to specify the interface when opening a mcast
> socket. (please correct me if I'm wrong). The IGMP packets will come out of
> only the first interface.
>
> my current scheme...
> GMcastSocket* socket = gnet_mcast_socket_new();
> GInetAddr* group = gnet_inetaddr_new( "239.255.237.255", EDNET_PORT);
> gint status = gnet_mcast_socket_join_group( socket, group);
>
> what I want to do...
> GInetAddr* interface = gnet_inetaddr_new( "192.168.2.1", 0);
> GMcastSocket* socket = gnet_mcast_socket_new_interface( interface);
> GInetAddr* group = gnet_inetaddr_new( "239.255.237.255", EDNET_PORT);
> gint status = gnet_mcast_socket_join_group( socket, group);
>
> How can I accomplish this?
--
__ _ __ David Helder - dhelder umich edu
___/ /__ __ __(_)__/ / <http://www.eecs.umich.edu/~dhelder>
/ _ / _ `/ |/ / / _ / Jungle Monkey: <http://www.junglemonkey.net>
|_,_/|_,_/|___/_/|_,_/ Paper CD Case: <http://www.papercdcase.com>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]