Skip to content

Commit 065a2dd

Browse files
committed
add doc
1 parent 614a26d commit 065a2dd

23 files changed

+1138
-5
lines changed

.gitignore

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ examples/*.beam
1313
.eunit/*
1414
log
1515

16-
examples/proxy_openbsd/log
17-
examples/proxy_openbsd/deps
18-
examples/proxy_openbsd/ebim
16+
examples/echo/log
17+
examples/echo/deps
18+
examples/echo/ebin

Makefile

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
REBAR?=./rebar
2+
3+
all: build
4+
5+
dev: devbuild
6+
7+
doc: dev
8+
$(REBAR) -C rebar_dev.config doc
9+
10+
clean:
11+
$(REBAR) clean
12+
13+
distclean: clean
14+
@rm -rf deps
15+
16+
build: deps
17+
$(REBAR) compile
18+
19+
deps:
20+
$(REBAR) get-deps
21+
22+
23+
# development
24+
#
25+
devclean:
26+
$(REBAR) -C rebar_dev.config clean
27+
28+
devbuild: devdeps
29+
$(REBAR) -C rebar_dev.config compile
30+
31+
devdeps:
32+
$(REBAR) -C rebar_dev.config get-deps
33+
34+
35+
.PHONY: doc deps

README.md

+22-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1-
# barrel
21

3-
barrel is a generic TCP acceptor pool with low latency in Erlang.
2+
3+
# barrel - generic TCP acceptor pool #
4+
5+
Copyright (c) 2013 Benoît Chesneau.
6+
7+
__Version:__ 1.0
8+
9+
10+
## Modules ##
11+
12+
13+
<table width="100%" border="0" summary="list of modules">
14+
<tr><td><a href="http://github.com/benoitc/nat_upnp/blob/master/doc/barrel.md" class="module">barrel</a></td></tr>
15+
<tr><td><a href="http://github.com/benoitc/nat_upnp/blob/master/doc/barrel_acceptor.md" class="module">barrel_acceptor</a></td></tr>
16+
<tr><td><a href="http://github.com/benoitc/nat_upnp/blob/master/doc/barrel_app.md" class="module">barrel_app</a></td></tr>
17+
<tr><td><a href="http://github.com/benoitc/nat_upnp/blob/master/doc/barrel_deps.md" class="module">barrel_deps</a></td></tr>
18+
<tr><td><a href="http://github.com/benoitc/nat_upnp/blob/master/doc/barrel_listener.md" class="module">barrel_listener</a></td></tr>
19+
<tr><td><a href="http://github.com/benoitc/nat_upnp/blob/master/doc/barrel_ssl.md" class="module">barrel_ssl</a></td></tr>
20+
<tr><td><a href="http://github.com/benoitc/nat_upnp/blob/master/doc/barrel_sup.md" class="module">barrel_sup</a></td></tr>
21+
<tr><td><a href="http://github.com/benoitc/nat_upnp/blob/master/doc/barrel_tcp.md" class="module">barrel_tcp</a></td></tr>
22+
<tr><td><a href="http://github.com/benoitc/nat_upnp/blob/master/doc/barrel_util.md" class="module">barrel_util</a></td></tr></table>
23+

doc/README.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
3+
# barrel - generic TCP acceptor pool #
4+
5+
Copyright (c) 2013 Benoît Chesneau.
6+
7+
__Version:__ 1.0
8+
9+
10+
## Modules ##
11+
12+
13+
<table width="100%" border="0" summary="list of modules">
14+
<tr><td><a href="barrel.md" class="module">barrel</a></td></tr>
15+
<tr><td><a href="barrel_acceptor.md" class="module">barrel_acceptor</a></td></tr>
16+
<tr><td><a href="barrel_app.md" class="module">barrel_app</a></td></tr>
17+
<tr><td><a href="barrel_deps.md" class="module">barrel_deps</a></td></tr>
18+
<tr><td><a href="barrel_listener.md" class="module">barrel_listener</a></td></tr>
19+
<tr><td><a href="barrel_ssl.md" class="module">barrel_ssl</a></td></tr>
20+
<tr><td><a href="barrel_sup.md" class="module">barrel_sup</a></td></tr>
21+
<tr><td><a href="barrel_tcp.md" class="module">barrel_tcp</a></td></tr>
22+
<tr><td><a href="barrel_util.md" class="module">barrel_util</a></td></tr></table>
23+

doc/barrel.md

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
2+
3+
# Module barrel #
4+
* [Function Index](#index)
5+
* [Function Details](#functions)
6+
7+
8+
<a name="index"></a>
9+
10+
## Function Index ##
11+
12+
13+
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#start-0">start/0</a></td><td>Start the barrel application.</td></tr><tr><td valign="top"><a href="#start_listener-6">start_listener/6</a></td><td></td></tr><tr><td valign="top"><a href="#start_listener-7">start_listener/7</a></td><td></td></tr><tr><td valign="top"><a href="#stop-0">stop/0</a></td><td>Start the coffer application.</td></tr><tr><td valign="top"><a href="#stop_listener-1">stop_listener/1</a></td><td></td></tr></table>
14+
15+
16+
<a name="functions"></a>
17+
18+
## Function Details ##
19+
20+
<a name="start-0"></a>
21+
22+
### start/0 ###
23+
24+
`start() -> any()`
25+
26+
Start the barrel application. Useful when testing using the shell.
27+
<a name="start_listener-6"></a>
28+
29+
### start_listener/6 ###
30+
31+
`start_listener(Ref, NbAcceptors, Transport, TransOpts, Protocol, ProtocolOpts) -> any()`
32+
33+
34+
<a name="start_listener-7"></a>
35+
36+
### start_listener/7 ###
37+
38+
`start_listener(Ref, NbAcceptors, Transport, TransOpts, Protocol, ProtoOpts, ListenerOpts) -> any()`
39+
40+
41+
<a name="stop-0"></a>
42+
43+
### stop/0 ###
44+
45+
`stop() -> any()`
46+
47+
Start the coffer application. Useful when testing using the shell.
48+
<a name="stop_listener-1"></a>
49+
50+
### stop_listener/1 ###
51+
52+
`stop_listener(Ref) -> any()`
53+
54+

doc/barrel_acceptor.md

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
2+
3+
# Module barrel_acceptor #
4+
* [Function Index](#index)
5+
* [Function Details](#functions)
6+
7+
8+
<a name="index"></a>
9+
10+
## Function Index ##
11+
12+
13+
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#accept-5">accept/5</a></td><td></td></tr><tr><td valign="top"><a href="#start_link-5">start_link/5</a></td><td></td></tr></table>
14+
15+
16+
<a name="functions"></a>
17+
18+
## Function Details ##
19+
20+
<a name="accept-5"></a>
21+
22+
### accept/5 ###
23+
24+
`accept(Listener, Transport, ListenSocket, Opts, Protocol) -> any()`
25+
26+
27+
<a name="start_link-5"></a>
28+
29+
### start_link/5 ###
30+
31+
`start_link(Listener, Transport, ListenSocket, Opts, Protocol) -> any()`
32+
33+

doc/barrel_app.md

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
2+
3+
# Module barrel_app #
4+
* [Function Index](#index)
5+
* [Function Details](#functions)
6+
7+
__Behaviours:__ [`application`](application.md).
8+
<a name="index"></a>
9+
10+
## Function Index ##
11+
12+
13+
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#ensure_deps_started-0">ensure_deps_started/0</a></td><td></td></tr><tr><td valign="top"><a href="#start-2">start/2</a></td><td></td></tr><tr><td valign="top"><a href="#stop-1">stop/1</a></td><td></td></tr></table>
14+
15+
16+
<a name="functions"></a>
17+
18+
## Function Details ##
19+
20+
<a name="ensure_deps_started-0"></a>
21+
22+
### ensure_deps_started/0 ###
23+
24+
`ensure_deps_started() -> any()`
25+
26+
27+
<a name="start-2"></a>
28+
29+
### start/2 ###
30+
31+
`start(StartType, StartArgs) -> any()`
32+
33+
34+
<a name="stop-1"></a>
35+
36+
### stop/1 ###
37+
38+
`stop(State) -> any()`
39+
40+

doc/barrel_deps.md

+133
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
2+
3+
# Module barrel_deps #
4+
* [Function Index](#index)
5+
* [Function Details](#functions)
6+
7+
8+
<a name="index"></a>
9+
10+
## Function Index ##
11+
12+
13+
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#deps_on_path-0">deps_on_path/0</a></td><td>List of project dependencies on the path.</td></tr><tr><td valign="top"><a href="#ensure-0">ensure/0</a></td><td>Ensure that the ebin and include paths for dependencies of
14+
this application are on the code path.</td></tr><tr><td valign="top"><a href="#ensure-1">ensure/1</a></td><td>Ensure that all ebin and include paths for dependencies
15+
of the application for Module are on the code path.</td></tr><tr><td valign="top"><a href="#get_base_dir-0">get_base_dir/0</a></td><td>Return the application directory for this application.</td></tr><tr><td valign="top"><a href="#get_base_dir-1">get_base_dir/1</a></td><td>Return the application directory for Module.</td></tr><tr><td valign="top"><a href="#local_path-1">local_path/1</a></td><td>Return an application-relative directory for this application.</td></tr><tr><td valign="top"><a href="#local_path-2">local_path/2</a></td><td>Return an application-relative directory from Module's application.</td></tr><tr><td valign="top"><a href="#new_siblings-1">new_siblings/1</a></td><td>Find new siblings paths relative to Module that aren't already on the
16+
code path.</td></tr></table>
17+
18+
19+
<a name="functions"></a>
20+
21+
## Function Details ##
22+
23+
<a name="deps_on_path-0"></a>
24+
25+
### deps_on_path/0 ###
26+
27+
28+
<pre><code>
29+
deps_on_path() -&gt; [ProjNameAndVers]
30+
</code></pre>
31+
32+
<br></br>
33+
34+
35+
List of project dependencies on the path.
36+
<a name="ensure-0"></a>
37+
38+
### ensure/0 ###
39+
40+
41+
<pre><code>
42+
ensure() -&gt; ok
43+
</code></pre>
44+
45+
<br></br>
46+
47+
48+
Ensure that the ebin and include paths for dependencies of
49+
this application are on the code path. Equivalent to
50+
ensure(?Module).
51+
<a name="ensure-1"></a>
52+
53+
### ensure/1 ###
54+
55+
56+
<pre><code>
57+
ensure(Module) -&gt; ok
58+
</code></pre>
59+
60+
<br></br>
61+
62+
63+
Ensure that all ebin and include paths for dependencies
64+
of the application for Module are on the code path.
65+
<a name="get_base_dir-0"></a>
66+
67+
### get_base_dir/0 ###
68+
69+
70+
<pre><code>
71+
get_base_dir() -&gt; string()
72+
</code></pre>
73+
74+
<br></br>
75+
76+
77+
Return the application directory for this application. Equivalent to
78+
get_base_dir(?MODULE).
79+
<a name="get_base_dir-1"></a>
80+
81+
### get_base_dir/1 ###
82+
83+
84+
<pre><code>
85+
get_base_dir(Module) -&gt; string()
86+
</code></pre>
87+
88+
<br></br>
89+
90+
91+
Return the application directory for Module. It assumes Module is in
92+
a standard OTP layout application in the ebin or src directory.
93+
<a name="local_path-1"></a>
94+
95+
### local_path/1 ###
96+
97+
98+
<pre><code>
99+
local_path(Components) -&gt; string()
100+
</code></pre>
101+
102+
<br></br>
103+
104+
105+
Return an application-relative directory for this application.
106+
Equivalent to local_path(Components, ?MODULE).
107+
<a name="local_path-2"></a>
108+
109+
### local_path/2 ###
110+
111+
112+
<pre><code>
113+
local_path(Components::[string()], Module) -&gt; string()
114+
</code></pre>
115+
116+
<br></br>
117+
118+
119+
Return an application-relative directory from Module's application.
120+
<a name="new_siblings-1"></a>
121+
122+
### new_siblings/1 ###
123+
124+
125+
<pre><code>
126+
new_siblings(Module) -&gt; [Dir]
127+
</code></pre>
128+
129+
<br></br>
130+
131+
132+
Find new siblings paths relative to Module that aren't already on the
133+
code path.

0 commit comments

Comments
 (0)