Table of Contents
List of Tables
List of Examples
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:
... listen = bin:127.0.0.1 # change the listening IP listen = bin:127.0.0.1:5080 # change the listening IP and port ...
The default port to be used by all TCP listeners.
Default value is 5555.
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.
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) ...
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).
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) ...
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) ...
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) ...
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) | 16 | 14 | 36 | 19 |
2. | Ionel Cerghit (@ionel-cerghit) | 14 | 3 | 1196 | 38 |
3. | Liviu Chircu (@liviuchircu) | 7 | 5 | 31 | 43 |
4. | Bogdan-Andrei Iancu (@bogdan-iancu) | 7 | 5 | 19 | 4 |
5. | Eseanu Marius Cristian (@eseanucristian) | 4 | 2 | 1 | 5 |
6. | Vlad Patrascu (@rvlad-patrascu) | 2 | 1 | 1 | 0 |
(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
Table 2.2. Most recently active contributors(1) to this module
Name | Commit Activity | |
---|---|---|
1. | Razvan Crainea (@razvancrainea) | Aug 2015 - Sep 2019 |
2. | Bogdan-Andrei Iancu (@bogdan-iancu) | Mar 2017 - May 2019 |
3. | Liviu Chircu (@liviuchircu) | Mar 2016 - Jun 2018 |
4. | Vlad Patrascu (@rvlad-patrascu) | May 2017 - May 2017 |
5. | Ionel Cerghit (@ionel-cerghit) | Jul 2015 - Dec 2016 |
6. | Eseanu Marius Cristian (@eseanucristian) | Jul 2015 - Jul 2015 |
(1) including any documentation-related commits, excluding merge commits
Last edited by: Bogdan-Andrei Iancu (@bogdan-iancu), Liviu Chircu (@liviuchircu), Ionel Cerghit (@ionel-cerghit).
doc copyrights:
Copyright © 2015 www.opensips-solutions.com