iproctor | 9a41a0c | 2007-07-16 21:59:24 +0000 | [diff] [blame^] | 1 | open Thrift |
2 | module T = Transport | ||||
3 | |||||
4 | class t (i,o) = | ||||
5 | object (self) | ||||
6 | inherit Transport.t | ||||
7 | method isOpen = true | ||||
8 | method opn = () | ||||
9 | method close = () | ||||
10 | method read buf off len = | ||||
11 | try | ||||
12 | really_input i buf off len; len | ||||
13 | with _ -> T.raise_TTransportExn ("TChannelTransport: Could not read "^(string_of_int len)) T.UNKNOWN | ||||
14 | method write buf off len = output o buf off len | ||||
15 | method flush = flush o | ||||
16 | end |