File: README.md

package info (click to toggle)
erlang-ranch 1.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 668 kB
  • sloc: erlang: 2,368; makefile: 45
file content (33 lines) | stat: -rw-r--r-- 818 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Ranch TCP reverse example
=========================

This example uses a `gen_server` to handle a protocol to revese input.
See `reverse_protocol.erl` for the implementation. Documentation about
this topic can be found in the guide:

  http://ninenines.eu/docs/en/ranch/HEAD/guide/protocols/#using_gen_server

To try this example, you need GNU `make` and `git` in your PATH.

To build the example, run the following command:

``` bash
$ make
```

To start the release in the foreground:

``` bash
$ ./_rel/tcp_reverse_example/bin/tcp_reverse_example console
```

Then start a telnet session to port 5555:

``` bash
$ telnet localhost 5555
```

Type in a few words and see them reversed! Amazing!

Be aware that there is a timeout of 5 seconds without receiving
data before the example server disconnects your session.