in reply to Re: UDP Broadcasts
in thread UDP Broadcasts

here is my current source:
#!/opt/perl-5.004/bin/perl use IO::Socket; my $pipeline_string= "\x00\x00\x07\xa2\x08\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x +00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0 +0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 +\x00\x00\x00\x00\x00\x00"; $bufsize = 1024; my $myip="204.4.143.170"; $sock = new IO::Socket::INET(PeerAddr => "255.255.255.255", PeerPort => "9", Proto => "udp", LocalAddr => $myip, LocalPort => "9999" ); $sock->send($pipeline_string); $sock->recv($buf, $bufsize); print $buf;

Replies are listed 'Best First'.
Re: Re: Re: UDP Broadcasts
by Anonymous Monk on May 02, 2002 at 17:54 UTC
    I think there is a bug(let) in IO::Socket::INET. Local* is ignored if there is a PeerAddr. Annoyingly you will need it in your code. Otherwise your code should be good. Are you sure that the answer is printable and is not cut short at the first \x00?