Implement buffered transport


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666386 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/alterl/src/thrift_protocol.erl b/lib/alterl/src/thrift_protocol.erl
index f50c612..7db7929 100644
--- a/lib/alterl/src/thrift_protocol.erl
+++ b/lib/alterl/src/thrift_protocol.erl
@@ -4,6 +4,7 @@
          write/2,
          read/2,
          skip/2,
+         flush_transport/1,
 
          typeid_to_atom/1,
 
@@ -17,7 +18,8 @@
 behaviour_info(callbacks) ->
     [
      {read, 2},
-     {write, 2}
+     {write, 2},
+     {flush_transport, 1}
     ];
 behaviour_info(_Else) -> undefined.
 
@@ -27,6 +29,10 @@
                    data = Data}}.
 
 
+flush_transport(#protocol{module = Module,
+                          data = Data}) ->
+    Module:flush_transport(Data).
+
 typeid_to_atom(?tType_STOP) -> field_stop;
 typeid_to_atom(?tType_VOID) -> void;
 typeid_to_atom(?tType_BOOL) -> bool;