NAME
IO::Socket::ByteCounter - Perl extension to track the byte sizes of data in and out of a socket
SYNOPSIS
or:
then:
... normal IO::Socket::INET object (as
$sock
)
use
...
'Bytes out: '
,
$sock
->get_bytes_out,
"\n"
;
'Bytes in: '
,
$sock
->get_bytes_in ,
"\n"
;
'Bytes total: '
,
$sock
->get_bytes_total,
"\n"
;
METHODS
record_bytes()
Takes a list of package names (or IO::Socket based objects) for which to turn on byte counting.
Its also creates 3, hopefully, self explanitory methods for the socket in question:
_get_byte_size()
Returns size of strings passed in bytes. Used internally.
TODO
Add [m]any methods that need bytes counted.
AUTHOR
Daniel Muey, http://drmuey.com/cpan_contact.pl
COPYRIGHT AND LICENSE
Copyright (C) 2006 by Daniel Muey
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.