Measure socket connection time

Discussion in 'Perl Misc' started by Ste, Mar 20, 2006.

  1. Ste

    Ste Guest

    Hi all,

    I've to deploy a (maybe simple) things:

    Just open a socket (host 10.10.10.10 port 15000)

    Measure the time for socket connection, send "quit" and close.

    There's some usefull functions to do it?


    Thanks
    Ste
    Ste, Mar 20, 2006
    #1
    1. Advertising

  2. Ste <stefano@#NOSPAMME#3000.it> wrote in
    news:pan.2006.03.20.13.30.43.617593@#NOSPAMME#3000.it:

    > I've to deploy a (maybe simple) things:
    >
    > Just open a socket (host 10.10.10.10 port 15000)
    >
    > Measure the time for socket connection, send "quit" and close.
    >
    > There's some usefull functions to do it?


    You can use IO::Socket and time.

    Once you have given it a shot, post a short but complete script here if
    you have any problems.

    Sinan
    --
    A. Sinan Unur <>
    (remove .invalid and reverse each component for email address)

    comp.lang.perl.misc guidelines on the WWW:
    http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
    A. Sinan Unur, Mar 20, 2006
    #2
    1. Advertising

  3. Ste

    DJ Stunks Guest

    A. Sinan Unur wrote:
    > Ste <stefano@#NOSPAMME#3000.it> wrote in
    > news:pan.2006.03.20.13.30.43.617593@#NOSPAMME#3000.it:
    >
    > > I've to deploy a (maybe simple) things:
    > >
    > > Just open a socket (host 10.10.10.10 port 15000)
    > >
    > > Measure the time for socket connection, send "quit" and close.
    > >
    > > There's some usefull functions to do it?

    >
    > You can use IO::Socket and time.


    perhaps Time::HiRes? I imagine socket connect time will be well under
    1s...

    -jp
    DJ Stunks, Mar 20, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. antoine
    Replies:
    2
    Views:
    1,460
    Abhijat Vatsyayan
    Oct 1, 2005
  2. Laszlo Nagy
    Replies:
    1
    Views:
    4,807
    Mark Wooding
    Jan 27, 2009
  3. Jean-Paul Calderone
    Replies:
    0
    Views:
    960
    Jean-Paul Calderone
    Jan 27, 2009
  4. Laszlo Nagy
    Replies:
    0
    Views:
    542
    Laszlo Nagy
    Feb 1, 2009
  5. Steve Holden
    Replies:
    0
    Views:
    655
    Steve Holden
    Feb 1, 2009
Loading...

Share This Page