Thrift: OCaml library and generator

Summary: Added (minimal) library and code generator for OCaml.
Reviewed by: mcslee
Test plan: Test client and server (included).
Revert plan: yes


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665163 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/ocaml/src/TChannelTransport.ml b/lib/ocaml/src/TChannelTransport.ml
new file mode 100644
index 0000000..89ae352
--- /dev/null
+++ b/lib/ocaml/src/TChannelTransport.ml
@@ -0,0 +1,16 @@
+open Thrift
+module T = Transport
+
+class t (i,o) =
+object (self)
+  inherit Transport.t
+  method isOpen = true
+  method opn = ()
+  method close = ()
+  method read buf off len = 
+    try 
+      really_input i buf off len; len
+    with _ -> T.raise_TTransportExn ("TChannelTransport: Could not read "^(string_of_int len)) T.UNKNOWN
+  method write buf off len = output o buf off len
+  method flush = flush o
+end