Skip to content

Mirror of main repository for a generic non-blocking TCP listener framework written in Erlang.

License

Notifications You must be signed in to change notification settings

ogolosovskiy/tcp_listener

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TCP_LISTENER
============

This software, tcp_listener, is a generic non-blocking TCP listener framework.
The main usage is to write non-blocking TCP servers without needing to think
about all the small details about non-blocking TCP listeners and acceptors,
thusly following the "generic practice" often found in Erlang/OTP.

Source tracking is available at

    http://gitorious.org/avtobiff/tcp_listener

To clone the main developing repository invoke

    git clone git://gitorious.org/avtobiff/tcp_listener.git



DEPENDENCIES
------------
In order to build and run tcp_listener Erlang/OTP is needed. On Debian based
systems install erlang by invoking

    sudo aptitude install erlang

For more information see Erlang's home on the internets

    http://erlang.org/



BUILD AND INSTALL
-----------------
To build tcp_listener simply run

    make

Optionally install it to the system Erlang lib directory (/usr/lib/erlang/lib)
by invoking

    sudo make install

To change PREFIX of installation do (default PREFIX is /usr)

    sudo make PREFIX=/usr/local install



USAGE
-----
The server need only to implement the gen_tcp_acceptor behaviour and then start
the tcp_listener with this module as argument

    tcp_listener:start_link({local, my_server},    %% Name
                            my_server_module,      %% Module -- acceptor
                            [{port, 8000}],        %% Args
                            [])                    %% Opts -- generally not used

See the edoc in the source code for documentation and also the examples
directory for examples on how to use tcp_listener.



INSPIRATION
-----------
http://www.trapexit.org/Building_a_Non-blocking_TCP_server_using_OTP_principles

http://github.com/erlware/gen_socket

http://github.com/kaos/gen_listener_tcp



 -- Per Andersson <[email protected]>  Mon, 14 Feb 2011 10:19:39 +0100

About

Mirror of main repository for a generic non-blocking TCP listener framework written in Erlang.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Erlang 100.0%