Re: [gnet] mcast not receiving
- From: David Helder <dhelder umich edu>
- To: Shaun Jackman <sjackman pathwayconnect com>
- Cc: <gnet gnetlibrary org>
- Subject: Re: [gnet] mcast not receiving
- Date: Wed, 3 Oct 2001 14:55:34 -0400 (EDT)
If you modify examples/sdr.c to receive from your group, does that work?
I think the ttl is high enough..
David
On Wed, 3 Oct 2001, Shaun Jackman wrote:
> I set up a mcast receive socket, but it doesn't seem to be receiving!
> I'm not sure where to start troubleshooting. The code's not long so I've
> attached the pertinent bit at the end of this e-mail. I ran tcpdump to make
> sure the packet is going out on the wire, and it seems to have made it there
> just fine. I traced it with gdb and it blocks in the call to
> gnet_mcast_socket_receive. Any idea why it's not receiving?
>
> $ tcpdump -ei eth1
> 12:00:47.540261 0:1:2:c3:fd:8a 1:0:5e:7f:ed:ff ip 60: 192.168.0.3.35477 >
> 239.255.237.255.3792: udp 16 (DF) [ttl 1]
>
> Thanks,
> Shaun
>
> [begin code]
> int
> main( int argc, char* argv[])
> {
> // init
> GMcastSocket* socket = gnet_mcast_socket_new();
> g_assert( socket);
> GInetAddr* group = gnet_inetaddr_new( "239.255.237.255", EDNET_PORT);
> g_assert( group);
> gint status = gnet_mcast_socket_join_group( socket, group);
> g_assert( !status);
> gint8 buf[ 1024];
> GUdpPacket* packet = gnet_udp_packet_receive_new( buf, sizeof( buf));
> g_assert( packet);
>
> // rx
> for(;;) {
> gint len = gnet_mcast_socket_receive( socket, packet);
> if( len == -1)
> continue;
> cout << "Received " << len << " bytes." << endl;
> }
>
> // cleanup
> gnet_mcast_socket_leave_group( socket, group);
> return 0;
> }
> [end code]
> _______________________________________________
> gnet mailing list
> gnet gnetlibrary org
> http://www.gnetlibrary.org/mailman/listinfo/gnet
>
--
__ _ __ 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]