Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Measure socket connection time

Reply
Thread Tools

Measure socket connection time

 
 
Ste
Guest
Posts: n/a
 
      03-20-2006
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
 
Reply With Quote
 
 
 
 
A. Sinan Unur
Guest
Posts: n/a
 
      03-20-2006
Ste <stefano@#NOSPAMME#3000.it> wrote in
newsan.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 <(E-Mail Removed)>
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/cl...uidelines.html

 
Reply With Quote
 
 
 
 
DJ Stunks
Guest
Posts: n/a
 
      03-20-2006
A. Sinan Unur wrote:
> Ste <stefano@#NOSPAMME#3000.it> wrote in
> newsan.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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: socket.unbind or socket.unlisten? - socket.error: (48, 'Addressalready in use') Steve Holden Python 0 02-01-2009 12:45 PM
Re: socket.unbind or socket.unlisten? - socket.error: (48, 'Addressalready in use') Laszlo Nagy Python 0 02-01-2009 07:37 AM
socket.unbind or socket.unlisten? - socket.error: (48, 'Addressalready in use') Laszlo Nagy Python 1 01-27-2009 05:05 PM
Re: socket.unbind or socket.unlisten? - socket.error: (48,'Address already in use') Jean-Paul Calderone Python 0 01-27-2009 01:41 PM
measure bandwidth in / out of socket antoine Java 2 10-01-2005 01:16 AM



Advertisments