| jfarrell | 3da0906 | 2014-10-08 01:18:07 -0400 | [diff] [blame] | 1 | # Thrift Erlang Software Library # |
| Bryan Duxbury | def30a6 | 2009-04-08 00:19:37 +0000 | [diff] [blame] | 2 | |
| jfarrell | 3da0906 | 2014-10-08 01:18:07 -0400 | [diff] [blame] | 3 | ## License ## |
| Bryan Duxbury | def30a6 | 2009-04-08 00:19:37 +0000 | [diff] [blame] | 4 | |
| 5 | Licensed to the Apache Software Foundation (ASF) under one |
| 6 | or more contributor license agreements. See the NOTICE file |
| 7 | distributed with this work for additional information |
| 8 | regarding copyright ownership. The ASF licenses this file |
| 9 | to you under the Apache License, Version 2.0 (the |
| 10 | "License"); you may not use this file except in compliance |
| 11 | with the License. You may obtain a copy of the License at |
| 12 | |
| 13 | http://www.apache.org/licenses/LICENSE-2.0 |
| 14 | |
| 15 | Unless required by applicable law or agreed to in writing, |
| 16 | software distributed under the License is distributed on an |
| 17 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 18 | KIND, either express or implied. See the License for the |
| 19 | specific language governing permissions and limitations |
| 20 | under the License. |
| 21 | |
| jfarrell | 3da0906 | 2014-10-08 01:18:07 -0400 | [diff] [blame] | 22 | ## Release Notes ## |
| 23 | |
| 24 | ### 0.9.2 ### |
| 25 | |
| 26 | as of 0.9.2 struct and function naming conventions have changed. to retain the |
| 27 | old naming conventions (for backwards compatibility) use the compiler option |
| 28 | `legacynames` |
| 29 | |
| 30 | ## Example ## |
| Bryan Duxbury | def30a6 | 2009-04-08 00:19:37 +0000 | [diff] [blame] | 31 | |
| David Reiss | 702019c | 2008-06-11 00:58:13 +0000 | [diff] [blame] | 32 | Example session using thrift_client: |
| 33 | |
| Jens Geyer | 1f1c206 | 2015-09-03 20:53:44 +0200 | [diff] [blame] | 34 | ```erl |
| Roger Meier | 4702fe6 | 2015-02-15 21:17:30 +0100 | [diff] [blame] | 35 | 1> {ok, C0} = thrift_client_util:new("localhost", 9090, thrift_test_thrift, []), ok. |
| David Reiss | 3f660a4 | 2010-08-30 22:05:29 +0000 | [diff] [blame] | 36 | ok |
| 37 | 2> {C1, R1} = thrift_client:call(C0, testVoid, []), R1. |
| David Reiss | 702019c | 2008-06-11 00:58:13 +0000 | [diff] [blame] | 38 | {ok,ok} |
| David Reiss | 3f660a4 | 2010-08-30 22:05:29 +0000 | [diff] [blame] | 39 | 3> {C2, R2} = thrift_client:call(C1, testVoid, [asdf]), R2. |
| David Reiss | 702019c | 2008-06-11 00:58:13 +0000 | [diff] [blame] | 40 | {error,{bad_args,testVoid,[asdf]}} |
| David Reiss | 3f660a4 | 2010-08-30 22:05:29 +0000 | [diff] [blame] | 41 | 4> {C3, R3} = thrift_client:call(C2, testI32, [123]), R3. |
| David Reiss | 702019c | 2008-06-11 00:58:13 +0000 | [diff] [blame] | 42 | {ok,123} |
| David Reiss | 3f660a4 | 2010-08-30 22:05:29 +0000 | [diff] [blame] | 43 | 5> {C4, R4} = thrift_client:call(C3, testOneway, [1]), R4. |
| David Reiss | 702019c | 2008-06-11 00:58:13 +0000 | [diff] [blame] | 44 | {ok,ok} |
| David Reiss | 3f660a4 | 2010-08-30 22:05:29 +0000 | [diff] [blame] | 45 | 6> {C5, R5} = thrift_client:call(C4, testXception, ["foo"]), R5. |
| David Reiss | 702019c | 2008-06-11 00:58:13 +0000 | [diff] [blame] | 46 | {error,{no_function,testXception}} |
| David Reiss | 3f660a4 | 2010-08-30 22:05:29 +0000 | [diff] [blame] | 47 | 7> {C6, R6} = thrift_client:call(C5, testException, ["foo"]), R6. |
| David Reiss | 702019c | 2008-06-11 00:58:13 +0000 | [diff] [blame] | 48 | {ok,ok} |
| David Reiss | 3f660a4 | 2010-08-30 22:05:29 +0000 | [diff] [blame] | 49 | 8> {C7, R7} = (catch thrift_client:call(C6, testException, ["Xception"])), R7. |
| 50 | {exception,{xception,1001,<<"Xception">>}} |
| Jens Geyer | 1f1c206 | 2015-09-03 20:53:44 +0200 | [diff] [blame] | 51 | ``` |