Skip to content

Neopallium/lua-llnet

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 

About

travis-ci status

A low-level network/socket library.

TCP Tunning

When running the client/server examples with a larger number of concurrent connections or with keep-alive disabled make sure to tune your system to get good results.

Linux

# somaxconn needs to be larger then the listen backlog value used by the server.
# (see note below about listen backlog).
echo 65536 > /proc/sys/net/core/somaxconn
# These are useful when stress testing/benchmarking where a large number of connections
# will be opened & closed quickly.
echo 1 >/proc/sys/net/ipv4/tcp_tw_recycle
echo 1 >/proc/sys/net/ipv4/tcp_tw_reuse
echo 10 >/proc/sys/net/ipv4/tcp_fin_timeout
# increase client-side port range, not needed on server.
echo 1024 65535 > /proc/sys/net/ipv4/ip_local_port_range
# If you have iptables setup with the connection tracking (nf_conntrack) module enabled
# then also increase these values
echo 262144 >/proc/sys/net/netfilter/nf_conntrack_max
echo 32768 >/sys/module/nf_conntrack/parameters/hashsize

Note about listen backlog

If the backlog value passed to listen() is greater then the value in /proc/sys/net/core/somaxconn it will be silenty truncated to some very small value. This goes against what the man-page for listen() says:

If    the   backlog   argument   is   greater   than   the   value   in
/proc/sys/net/core/somaxconn, then it is  silently  truncated  to  that
value;  the  default  value  in  this  file  is 128.  In kernels before
2.4.25, this limit was a hard coded value, SOMAXCONN,  with  the  value
128.

Installation

Lastest Git Revision

With CMake:

$ git clone git://github.com/Neopallium/lua-llnet.git
$ cd lua-llnet ; mkdir build ; cd build
$ cmake ..
$ make
$ sudo make install

Example usage

See the files under the examples/ folder

About

A low-level network IO library.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published