sophate has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,

May I know if there is any Perl module that can count the number of multicast packets and the number of bytes received? I have written some codes with IO::Socket::Multicast but unfortunately the recv() method doesn't give the statistics on the number of bytes received. Appreciate if you can guide me to the right module. Many thanks.

  • Comment on How to count the number of bytes of a multicast message received?

Replies are listed 'Best First'.
Re: How to count the number of bytes of a multicast message received?
by BrowserUk (Patriarch) on May 28, 2012 at 21:12 UTC
    the recv() method doesn't give the statistics on the number of bytes received.

    Maybe I'm misunderstanding you, but doesn't using length on the scalar variable that you supply to recv tell you what you want to know?


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

    The start of some sanity?

      Thanks BrowserUK! length will serve the purpose! I was so stupid and tried a couple of modules before I realized I could do it by simply getting the length of the variable, haha.

Re: How to count the number of bytes of a multicast message received?
by Anonymous Monk on May 28, 2012 at 20:49 UTC
    On win32 type OS those statistics are not available via sockets , but only via network card drivers and performance counters