Lite/Transport.pm untested

filter: Statementstmt 0.0% 0 / 10 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 7 Podpod 0.0% 0 / 7 totaltotal 0.0% 0 / 24 CC 1 SCAR 6.9
CC
1
Cov
0%
new
2.0
ReadData
2.0
WriteData
2.0
CRAP 2.0
1 package RPC::Lite::Transport;
2
3 =pod
4
5 =head1 NAME
6
7 RPC::Lite::Transport -- Transport base class.
8
9 =head1 DESCRIPTION
10
11 RPC::Lite::Transport is the base for implementing transport layers
12 for RPC::Lite.
13
14 =cut
15
16 sub new
17 {
18 my $class = shift;
19 my $self = {};
20 bless $self, $class;
21 return $self;
22 }
23
24 =pod
25
26 =over 4
27
28 =item ReadData( [$timeout] )
29
30 Attempts to read data from the stream within the
31 (optional) timeout period.
32
33 =cut
34
35 sub ReadData() { die( "Unimplemented virtual function!" ) }
36
37 =pod
38
39 =item WriteData( $data )
40
41 Writes $data to the stream. Returns the number of bytes written
42 or undef if there was an error.
43
44 =cut
45
46 sub WriteData() { die( "Unimplemented virtual function!" ) }
47
48 =pod
49
50 =item Connect()
51
52 Connects to the server specified on transport layer construction.
53 Returns a boolean indicating success or failure.
54
55 =cut
56
57 sub Connect() { die( "Unimplemented virtual function!" ) }
58
59 =pod
60
61 =item Disconnect()
62
63 Severs the connection with the server. Returns a boolean indicating
64 success or failure.
65
66 =cut
67
68 sub Disconnect() { die( "Unimplemented virtual function!" ) }
69
70 =pod
71
72 =item Listen()
73
74 Begin listening for incoming connections.
75
76 =cut
77
78 sub Listen() { die( "Unimplemented virtual function!" ) }
79
80 =pod
81
82 =item GetNewConnection()
83
84 Checks for a new incoming connection and returns an RPC::Lite::Transport
85 object of the proper type if there is one, undef otherwise.
86
87 =cut
88
89 sub GetNewConnection() { die( "Unimplemented virtual function!" ) }
90
91 =pod
92
93 =back
94
95 =back
96
97 =head1 SUPPORTED TRANSPORT LAYERS
98
99 =over 4
100
101 =item TCP
102
103 =back
104
105
106 =cut
107
108 1;