This looks like a reasonable fix. Am I still the primary maintainer of this
module? It has been years!
Lincoln
On Mon, Oct 29, 2018 at 1:01 PM Gogo Yubari via RT <
bug-IO-Socket-Multicast@rt.cpan.org> wrote:
Show quoted text> Queue: IO-Socket-Multicast
> Ticket <URL:
https://rt.cpan.org/Ticket/Display.html?id=76001 >
>
> Hello
> Sending the character '0' to mcast_send() will catch the exception.
>
> my $data = "\x30";
> eval {
> $socket->mcast_send($data, MCAST_DESTINATION);
> };
> if($@) {warn $@;}
>
> I am currently using send() for workaround.
> Thank you.
>
>
> On 2012-3月-23 金 07:11:07, bramble wrote:
> > On Fri Mar 23 06:20:44 2012, srinkes@genua.de wrote:
> > > Hello,
> > >
> > > mcast_send() currently does not allow to send 0 Byte packets.
> > >
> > > It croaks with: usage: $sock->mcast_send($data [,$address])
> > >
> > > lib/IO/Socket/Multicast.pm:
> > >
> > > sub mcast_send {
> > > my $sock = shift;
> > > my $data = shift || croak 'usage: $sock->mcast_send($data
> [,$address])';
> > > $sock->mcast_dest(shift) if @_;
> > > my $dest = $sock->mcast_dest || croak "no destination specified with
> > > mcast_send() or mcast_dest()";
> > > return send($sock,$data,0,$dest);
> > > }
> > >
> > > IMHO it should be:
> > >
> > > my $data = shift // croak 'usage: $sock->mcast_send($data
> [,$address])';
> > >
> > >
> > > Stefan Rinkes
> >
> > Thanks Stefan , indeed I don't see a good reason to stop the caller from
> > sending a zero byte payload if desired. Though I dislike // - that can
> > also be avoided without any trouble.
> >
> >
> >
>
--
*Lincoln Stein*
Head, Adaptive Oncology, OICR
Senior Principal Investigator, OICR
Professor, Department of Molecular Genetics, University of Toronto
<
http://goog_1828306398>
*Ontario Institute for Cancer Research*
MaRS Centre
661 University Avenue
Suite 510
Toronto, Ontario
Canada M5G 0A3
Tel: 416-673-8514
Mobile: 416-817-8240
Email: lincoln.stein@gmail.com
Toll-free: 1-866-678-6427
Twitter: @OICR_news
*Executive Assistant*
*Melisa Torres*
Tel: 647-259-4253
Email: melisa.torres@oicr.on.ca <stacey.quinn@oicr.on.ca>
www.oicr.on.ca
This message and any attachments may contain confidential and/or privileged
information for the sole use of the intended recipient. Any review or
distribution by anyone other than the person for whom it was originally
intended is strictly prohibited. If you have received this message in
error, please contact the sender and delete all copies. Opinions,
conclusions or other information contained in this message may not be that
of the organization.