| 1 | package Lab::Connection::TCPraw; | ||
| 2 | #ABSTRACT: Raw TCP connection; deprecated, use Socket instead | ||
| 3 | $Lab::Connection::TCPraw::VERSION = '3.899'; | ||
| 4 | use v5.20; | ||
| 5 | |||
| 6 | use strict; | ||
| 7 | use Scalar::Util qw(weaken); | ||
| 8 | use Time::HiRes qw (usleep sleep); | ||
| 9 | use Lab::Connection::GPIB; | ||
| 10 | use Lab::Exception; | ||
| 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 | my $proto = shift; | ||
| 28 | my $class = ref($proto) || $proto; | ||
| 29 | my $twin = undef; | ||
| 30 | my $self = $class->SUPER::new(@_) | ||
| 31 | ; # getting fields and _permitted from parent class | ||
| 32 | $self->${ \( __PACKAGE__ . '::_construct' ) }(__PACKAGE__); | ||
| 33 | |||
| 34 | return $self; | ||
| 35 | } | ||
| 36 | |||
| 37 | # | ||
| 38 | # That's all folks. For now. | ||
| 39 | # | ||
| 40 | |||
| 41 | 1; | ||
| 42 | |||
| 43 | __END__ |