line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Lab::Connection::TCPraw; |
2
|
|
|
|
|
|
|
#ABSTRACT: Raw TCP connection; deprecated, use Socket instead |
3
|
|
|
|
|
|
|
$Lab::Connection::TCPraw::VERSION = '3.881'; |
4
|
1
|
|
|
1
|
|
1866
|
use v5.20; |
|
1
|
|
|
|
|
4
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
27
|
|
7
|
1
|
|
|
1
|
|
6
|
use Scalar::Util qw(weaken); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
49
|
|
8
|
1
|
|
|
1
|
|
6
|
use Time::HiRes qw (usleep sleep); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
9
|
|
9
|
1
|
|
|
1
|
|
595
|
use Lab::Connection::GPIB; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
33
|
|
10
|
1
|
|
|
1
|
|
7
|
use Lab::Exception; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
128
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our @ISA = ("Lab::Connection::Socket"); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our %fields = ( |
15
|
|
|
|
|
|
|
bus_class => 'Lab::Bus::Socket', |
16
|
|
|
|
|
|
|
proto => 'tcp', |
17
|
|
|
|
|
|
|
remote_port => '5025', |
18
|
|
|
|
|
|
|
wait_status => 0, # usec; |
19
|
|
|
|
|
|
|
wait_query => 10e-6, # sec; |
20
|
|
|
|
|
|
|
read_length => 1000, # bytes |
21
|
|
|
|
|
|
|
timeout => 1, # seconds |
22
|
|
|
|
|
|
|
); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
# basically, we're just calling Socket with decent default port and proto |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub new { |
27
|
0
|
|
|
0
|
1
|
|
my $proto = shift; |
28
|
0
|
|
0
|
|
|
|
my $class = ref($proto) || $proto; |
29
|
0
|
|
|
|
|
|
my $twin = undef; |
30
|
0
|
|
|
|
|
|
my $self = $class->SUPER::new(@_) |
31
|
|
|
|
|
|
|
; # getting fields and _permitted from parent class |
32
|
0
|
|
|
|
|
|
$self->${ \( __PACKAGE__ . '::_construct' ) }(__PACKAGE__); |
|
0
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
0
|
|
|
|
|
|
return $self; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
# |
38
|
|
|
|
|
|
|
# That's all folks. For now. |
39
|
|
|
|
|
|
|
# |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
1; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
__END__ |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=pod |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=encoding UTF-8 |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 NAME |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Lab::Connection::TCPraw - Raw TCP connection; deprecated, use Socket instead |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 VERSION |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
version 3.881 |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
This software is copyright (c) 2023 by the Lab::Measurement team; in detail: |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Copyright 2011 Andreas K. Huettel, Florian Olbrich |
62
|
|
|
|
|
|
|
2012 Florian Olbrich, Hermann Kraus |
63
|
|
|
|
|
|
|
2013 Andreas K. Huettel |
64
|
|
|
|
|
|
|
2016 Simon Reinhardt |
65
|
|
|
|
|
|
|
2017 Andreas K. Huettel |
66
|
|
|
|
|
|
|
2020 Andreas K. Huettel |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
70
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=cut |