File Coverage

blib/lib/Thrift/XS/BinaryProtocol.pm
Criterion Covered Total %
statement 9 9 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 12 12 100.0


line stmt bran cond sub pod time code
1             package Thrift::XS::BinaryProtocol;
2              
3 4     4   26 use strict;
  4         6  
  4         169  
4 4     4   20 use base('Thrift::Protocol');
  4         7  
  4         2055  
5              
6 4     4   16699 use Thrift::XS;
  4         10  
  4         113  
7              
8             # Implementation is in BinaryProtocol.xs
9              
10             1;
11             __END__
12              
13             =head1 NAME
14              
15             Thrift::XS::BinaryProtocol - Standard binary protocol
16              
17             =head1 SYNOPSIS
18              
19             use Thrift;
20             use Thrift::Socket;
21             use Thrift::FramedTransport;
22             use Thrift::XS::CompactProtocol;
23             use MyThriftInterface;
24            
25             my $socket = Thrift::Socket->new( $host, $port );
26             my $transport = Thrift::FramedTransport->new($socket);
27             my $protocol = Thrift::XS::BinaryProtocol->new($transport);
28             my $client = MyThriftInterface->new($protocol);
29            
30             $transport->open;
31            
32             $client->api_call( @args );
33              
34             =head1 DESCRIPTION
35              
36             This is the standard Thrift binary protocol.
37              
38             =head1 AUTHOR
39              
40             Andy Grundman, E<lt>andy@slimdevices.comE<gt>
41              
42             =head1 COPYRIGHT AND LICENSE
43              
44             Copyright 2011 Logitech, Inc.
45              
46             Licensed under the Apache License, Version 2.0 (the "License");
47             you may not use this file except in compliance with the License.
48             You may obtain a copy of the License at
49              
50             http://www.apache.org/licenses/LICENSE-2.0
51              
52             Unless required by applicable law or agreed to in writing, software
53             distributed under the License is distributed on an "AS IS" BASIS,
54             WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
55             See the License for the specific language governing permissions and
56             limitations under the License.
57              
58             =cut