summaryrefslogtreecommitdiff
path: root/lib/diameter/examples/code
Commit message (Collapse)AuthorAgeFilesLines
* Finish/fix redirect exampleAnders Svensson2020-02-123-31/+99
| | | | | | The code was both broken and incomplete. Now it answers as it should, albeit using some encode functionality (ie. 3-tuple as diameter_avp value) that isn't currently documented.
* Rework/simplify examplesAnders Svensson2020-02-129-405/+456
| | | | | | | | | | | Make each example stand on its own by removing the common node module that just made for more difficult reading, and redo the fairly confusing transport config: now it's just a list of transport options as passed to diameter:add_transport/2, along with some syntactic sugar for transport_module/transport_config pairs. Also add a healthy README, that should probably be merged into the documentation.
* Update copyright yearHenrik Nord2018-06-181-1/+1
|
* Merge branch 'anders/diameter/codec/OTP-14511' into maintAnders Svensson2017-08-292-21/+18
|\ | | | | | | | | * anders/diameter/codec/OTP-14511: Use map decoding in example client
| * Use map decoding in example clientAnders Svensson2017-08-192-21/+18
| | | | | | | | | | | | As introduced in commit 1b3b64af and adjusted in commit e0603ba1. There's nothing client-specific about it, but keep the record format in the server example for the sake of coverage.
* | Add simple message_cb to example serverAnders Svensson2017-08-031-1/+28
|/
* Update copyright-yearErlang/OTP2016-12-071-1/+1
|
* Fix dictionary typo in relay exampleAnders Svensson2016-08-261-1/+1
|
* update copyright-yearHenrik Nord2016-03-155-5/+5
|
* Change license text to APLv2Bruce Yinhe2015-06-1811-99/+110
|
* Let examples override default service optionsAnders Svensson2015-03-243-3/+38
| | | | | | | | | | | To make them a bit more flexible. Can now do things like this: server:start([{'Product-Name', "Bob"}]), server:listen({tcp, [{capx_timeout, 2000}]}) Beware that the latter is completely different from this: server:listen(tcp, [{capx_timeout, 2000}])
* Set {restrict_connections, false} in example serverAnders Svensson2015-03-241-0/+1
| | | | | Since there's no reason to reject a client that wants to establish multiple connections, given that diameter can handle it.
* Set {string_decode, false} in examplesAnders Svensson2015-03-243-0/+3
| | | | | So as to do what's now recommended in diameter(1), in the grandparent commit.
* Refresh example codeAnders Svensson2015-02-207-212/+223
| | | | | | Which hasn't received any attention for some time. Clean it up, rename the poorly named peer.erl (it's Diameter *nodes* that are implemented), and make the it possible to specify arbitrary transport configuration.
* Rename reconnect_timer to connect_timer in examples and suitesAnders Svensson2014-11-031-1/+1
| | | | The timer was renamed in commit abea7186.
* Change answer_errors default from report to discardAnders Svensson2014-05-271-1/+0
| | | | | | | | | In the same vein as commit 00584303, to avoid logging traffic-related happenings. Not that the value in diameter.hrl is just documentation: the value is set explicitly when diameter:start_service/2 creates diameter_app records.
* Simplify example serverAnders Svensson2014-05-261-24/+14
| | | | In particular, remove the unnecessary list-or-record answer.
* Make example server answer unsupported requests with 3001Anders Svensson2014-05-261-5/+4
| | | | | As it should. The previous discard (surely) pre-dated being able to return {answer_message, 3001} from a handle_request callback.
* Make example code quietAnders Svensson2014-05-265-29/+12
| | | | | The output could make it impossible to use the shell. Counters returned diameter:service_info/2 can be used to check for expected happenings.
* Update example client to allow default local addressAnders Svensson2013-04-111-11/+17
| | | | | | | Note that the semantics of client:connect/1 have changed slightly: the second element in an argument 3-tuple is a remote address, the local address being the transport module's default. Previously it was interpreted as a common local/remote address.
* Minor tweaks and fixesAnders Svensson2013-03-241-2/+2
| | | | | Fix a broken include in example code, remove an inappropriate ct:pal/2 outside of a testcase, echo more info from test/Makefile.
* Update example codeAnders Svensson2012-08-231-0/+5
|
* Update include paths in example codeAnders Svensson2012-03-2610-19/+19
| | | | | Paths changed as a consequence of OTP-9638. Don't use paths under src however, assume an installation.
* Move example code to examples/codeAnders Svensson2011-12-1611-0/+1030