-
Notifications
You must be signed in to change notification settings - Fork 564
/
README
241 lines (173 loc) · 7.31 KB
/
README
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
proto_bin Module
__________________________________________________________
Table of Contents
1. Admin Guide
1.1. Overview
1.2. Dependencies
1.2.1. OpenSIPS Modules
1.2.2. External Libraries or Applications
1.3. Exported Parameters
1.3.1. bin_port (integer)
1.3.2. bin_send_timeout (integer)
1.3.3. bin_max_msg_chunks (integer)
1.3.4. bin_async (integer)
1.3.5. bin_async_max_postponed_chunks (integer)
1.3.6. bin_async_local_connect_timeout (integer)
1.3.7. bin_async_local_write_timeout (integer)
2. Contributors
2.1. By Commit Statistics
2.2. By Commit Activity
3. Documentation
3.1. Contributors
List of Tables
2.1. Top contributors by DevScore^(1), authored commits^(2) and
lines added/removed^(3)
2.2. Most recently active contributors^(1) to this module
List of Examples
1.1. Set bin_port parameter
1.2. Set bin_send_timeout parameter
1.3. Set bin_max_msg_chunks parameter
1.4. Set bin_async parameter
1.5. Set bin_async_max_postponed_chunks parameter
1.6. Set bin_async_local_connect_timeout parameter
1.7. Set bin_async_local_write_timeout parameter
Chapter 1. Admin Guide
1.1. Overview
The proto_bin module is a transport module which implements
Binary Interface TCP-based communication. It does not handle
TCP connections management, but only offers higher-level
primitives to read and write BIN messages over TCP. It calls
registered callback functions for every complete message
received.
Once loaded, you will be able to define BIN listeners in your
configuration file by adding their IP and, optionally, a
listening port, similar to this example:
...
socket= bin:127.0.0.1 # change the listening IP
socket= bin:127.0.0.1:5080 # change the listening IP and port
...
1.2. Dependencies
1.2.1. OpenSIPS Modules
The following modules must be loaded before this module:
* None.
1.2.2. External Libraries or Applications
The following libraries or applications must be installed
before running OpenSIPS with this module loaded:
* None.
1.3. Exported Parameters
1.3.1. bin_port (integer)
The default port to be used by all TCP listeners.
Default value is 5555.
Example 1.1. Set bin_port parameter
...
modparam("proto_bin", "bin_port", 6666)
...
1.3.2. bin_send_timeout (integer)
Time in milliseconds after a TCP connection will be closed if
it is not available for blocking writing in this interval (and
OpenSIPS wants to send something on it).
Default value is 100 ms.
Example 1.2. Set bin_send_timeout parameter
...
modparam("proto_bin", "bin_send_timeout", 200)
...
1.3.3. bin_max_msg_chunks (integer)
The maximum number of chunks in which a BIN message is expected
to arrive via TCP. If a received packet is more fragmented than
this, the connection is dropped (either the connection is very
overloaded and this leads to high fragmentation - or we are the
victim of an ongoing attack where the attacker is sending very
fragmented traffic in order to decrease server performance).
Default value is 32.
Example 1.3. Set bin_max_msg_chunks parameter
...
modparam("proto_bin", "bin_max_msg_chunks", 8)
...
1.3.4. bin_async (integer)
Specifies whether the TCP connect and write operations should
be done in an asynchronous mode (non-blocking connect and
write) or not. If disabled, OpenSIPS will block and wait for
TCP operations like connect and write.
Default value is 1 (enabled).
Example 1.4. Set bin_async parameter
...
modparam("proto_bin", "bin_async", 0)
...
1.3.5. bin_async_max_postponed_chunks (integer)
If bin_async is enabled, this specifies the maximum number of
BIN messages that can be stashed for later/async writing. If
the connection pending writes exceed this number, the
connection will be marked as broken and dropped.
Default value is 32.
Example 1.5. Set bin_async_max_postponed_chunks parameter
...
modparam("proto_bin", "bin_async_max_postponed_chunks", 16)
...
1.3.6. bin_async_local_connect_timeout (integer)
If bin_async is enabled, this specifies the number of
milliseconds that a connect will be tried in blocking mode
(optimization). If the connect operation lasts more than this,
the connect will go to async mode and will be passed to TCP
MAIN for polling.
Default value is 100 ms.
Example 1.6. Set bin_async_local_connect_timeout parameter
...
modparam("proto_bin", "bin_async_local_connect_timeout", 200)
...
1.3.7. bin_async_local_write_timeout (integer)
If bin_async is enabled, this specifies the number of
milliseconds that a write op will be tried in blocking mode
(optimization). If the write operation lasts more than this,
the write will go to async mode and will be passed to bin MAIN
for polling.
Default value is 10 ms.
Example 1.7. Set bin_async_local_write_timeout parameter
...
modparam("proto_bin", "tcp_async_local_write_timeout", 100)
...
Chapter 2. Contributors
2.1. By Commit Statistics
Table 2.1. Top contributors by DevScore^(1), authored
commits^(2) and lines added/removed^(3)
Name DevScore Commits Lines ++ Lines --
1. Razvan Crainea (@razvancrainea) 27 18 57 465
2. Ionel Cerghit (@ionel-cerghit) 14 3 1196 38
3. Vlad Patrascu (@rvlad-patrascu) 12 3 687 135
4. Bogdan-Andrei Iancu (@bogdan-iancu) 9 7 29 9
5. Liviu Chircu (@liviuchircu) 8 6 33 45
6. Eseanu Marius Cristian (@eseanucristian) 4 2 1 5
7. Nick Altmann (@nikbyte) 3 1 4 4
8. Peter Lemenkov (@lemenkov) 3 1 1 1
(1) DevScore = author_commits + author_lines_added /
(project_lines_added / project_commits) + author_lines_deleted
/ (project_lines_deleted / project_commits)
(2) including any documentation-related commits, excluding
merge commits. Regarding imported patches/code, we do our best
to count the work on behalf of the proper owner, as per the
"fix_authors" and "mod_renames" arrays in
opensips/doc/build-contrib.sh. If you identify any
patches/commits which do not get properly attributed to you,
please submit a pull request which extends "fix_authors" and/or
"mod_renames".
(3) ignoring whitespace edits, renamed files and auto-generated
files
2.2. By Commit Activity
Table 2.2. Most recently active contributors^(1) to this module
Name Commit Activity
1. Liviu Chircu (@liviuchircu) Mar 2016 - Sep 2021
2. Razvan Crainea (@razvancrainea) Aug 2015 - Aug 2021
3. Nick Altmann (@nikbyte) May 2021 - May 2021
4. Bogdan-Andrei Iancu (@bogdan-iancu) Mar 2017 - Apr 2021
5. Vlad Patrascu (@rvlad-patrascu) May 2017 - Feb 2021
6. Peter Lemenkov (@lemenkov) Jun 2018 - Jun 2018
7. Ionel Cerghit (@ionel-cerghit) Jul 2015 - Dec 2016
8. Eseanu Marius Cristian (@eseanucristian) Jul 2015 - Jul 2015
(1) including any documentation-related commits, excluding
merge commits
Chapter 3. Documentation
3.1. Contributors
Last edited by: Liviu Chircu (@liviuchircu), Bogdan-Andrei
Iancu (@bogdan-iancu), Peter Lemenkov (@lemenkov), Ionel
Cerghit (@ionel-cerghit).
Documentation Copyrights:
Copyright © 2015 www.opensips-solutions.com