mochiweb style avoidance of gen_tcp:controlling_process
TODO: remove extraneous debug_rlogs
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666431 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/alterl/src/thrift_transport.erl b/lib/alterl/src/thrift_transport.erl
index f901f74..6c0c663 100644
--- a/lib/alterl/src/thrift_transport.erl
+++ b/lib/alterl/src/thrift_transport.erl
@@ -5,13 +5,15 @@
-export([new/2,
write/2,
read/2,
- flush/1
+ flush/1,
+ close/1
]).
behaviour_info(callbacks) ->
[{read, 2},
{write, 2},
- {flush, 1}
+ {flush, 1},
+ {close, 1}
].
-record(transport, { module, data }).
@@ -30,3 +32,6 @@
flush(#transport{module = Module, data = Data}) ->
Module:flush(Data).
+
+close(#transport{module = Module, data = Data}) ->
+ Module:close(Data).