erlang: Client refactor, part 1

- Client is no longer a separate process.
- Simplified constructors moved into another module.
- All functions and exceptions return the new client,
  to allow for future statefulness in the client.

NOTE: With the new library and old gen-code, attempting to call a
nonexistent function will result in an exit.

TODO: fix docs and tests (tether test is not meaningful)

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990979 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/erl/README b/lib/erl/README
index ddb6946..667c549 100644
--- a/lib/erl/README
+++ b/lib/erl/README
@@ -25,32 +25,19 @@
 
 Example session using thrift_client:
 
-118> f(), {ok, C} = thrift_client:start_link("localhost", 9090, thriftTest_thrif
-t).
-{ok,<0.271.0>}
-119> thrift_client:call(C, testVoid, []).
+1> {ok, C0} = thrift_client_util:new("localhost", 9090, thriftTest_thrift, []), ok.
+ok
+2> {C1, R1} = thrift_client:call(C0, testVoid, []), R1.
 {ok,ok}
-120> thrift_client:call(C, testVoid, [asdf]).
+3> {C2, R2} = thrift_client:call(C1, testVoid, [asdf]), R2.
 {error,{bad_args,testVoid,[asdf]}}
-121> thrift_client:call(C, testI32, [123]).
+4> {C3, R3} = thrift_client:call(C2, testI32, [123]), R3.
 {ok,123}
-122> thrift_client:call(C, testOneway, [1]).
+5> {C4, R4} = thrift_client:call(C3, testOneway, [1]), R4.
 {ok,ok}
-123> catch thrift_client:call(C, testXception, ["foo"]).
+6> {C5, R5} = thrift_client:call(C4, testXception, ["foo"]), R5.
 {error,{no_function,testXception}}
-124> catch thrift_client:call(C, testException, ["foo"]).
+7> {C6, R6} = thrift_client:call(C5, testException, ["foo"]), R6.
 {ok,ok}
-125> catch thrift_client:call(C, testException, ["Xception"]).
-{xception,1001,"This is an Xception"}
-126> thrift_client:call(C, testException, ["Xception"]).
-
-=ERROR REPORT==== 24-Feb-2008::23:00:23 ===
-Error in process <0.269.0> with exit value: {{nocatch,{xception,1001,"This is an
- Xception"}},[{thrift_client,call,3},{erl_eval,do_apply,5},{shell,exprs,6},{shel
-l,eval_loop,3}]}
-
-** exited: {{nocatch,{xception,1001,"This is an Xception"}},
-            [{thrift_client,call,3},
-             {erl_eval,do_apply,5},
-             {shell,exprs,6},
-             {shell,eval_loop,3}]} **
+8> {C7, R7} = (catch thrift_client:call(C6, testException, ["Xception"])), R7.
+{exception,{xception,1001,<<"Xception">>}}