Module crary_port

This module is responsible for opening a TCP port to listen on and starting new crary_sock workers to accept(2) and process requests.

Copyright © 2007, 2008 Scott Parish <srp@srparish.net>

Behaviours: gen_server.

Authors: Scott Parish (srp@srparish.net).

Description

This module is responsible for opening a TCP port to listen on and starting new crary_sock workers to accept(2) and process requests. To start crary listening on a port, see crary:start/3.

Function Index

accepted/1crary_sock calls this to notify this module that it has successfully accept(2)ed a new connection.
start_link/2Start a crary_port server to listen on a port.
start_link/3Start a crary_port server to listen on a port.

Function Details

accepted/1

accepted() -> term()

crary_sock calls this to notify this module that it has successfully accept(2)ed a new connection. This module can then start a new crary_sock to start listening for the next connection.

start_link/2

start_link(TcpPort::integer(), Handler::crary:mfa()) -> {ok, pid()} | ignore | {error, {already_started, pid()}} | {error, term()}

Start a crary_port server to listen on a port. Its not preferable to call this directly; see crary:start/2

start_link/3

start_link(TcpPort::integer(), Handler::crary:mfa(), Options::crary:proplist()) -> {ok, pid()} | ignore | {error, {already_started, pid()}} | {error, term()}

Start a crary_port server to listen on a port. Its not preferable to call this directly; see crary:start/3

See also: start_link/3.


Generated by EDoc, Mar 14 2008, 22:35:53.