Most glorious Monks,

I started learning Perl 2 or 3 months ago, and my first 'project' is to write some that will capture RTP packets (with Net:Pcap) and eventual decode the resulting payload (with Net::RTP::Packet). All in a VoIP respect.. to be clear.

While planning something on paper, to roughly judge how I will code this, I realised that I wasn't sure how I could have this deal with multiple instances of RTP packets being captured.

For example.. 1 call begins and the script picks this up and begins to output the payload to a file. While this call is occuring a 2nd call begins -...

That's where I can't percieve how the script will react? I imagined looping the capture would be the right thing to do.. but would it begin to capture a 2nd call without the 1st one having finished?

I perhaps feel like I'm not aware of a concept, as Perl is my first programming language.

Thanks for any direction you can give.

Thank you Monks,

Ben


In reply to Dealing with multiple processes? by bigmoose

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.