Keeps track of a number of TCP sessions.
This module will manage a collection of TCP sessions for the same
server. If Port is 0, the underlying OS assigns an available
port number. If a Name is not specified, the server will be
named picoSocketServer_ ++ the TCP port number that the service
listens to, e.g. picoSocketServer_9923.
A managed server can be started, stopped, enumerate child sessions, and limit the maximum number of child sessions.
The conventions used by this module look quite different than OTP-based services, due to its origin.| cold_start/7 | |
| server_children/1 | |
| server_children/2 | |
| server_port/1 | |
| server_port/2 | |
| server_status/1 | |
| server_status/2 | |
| start_child/3 | |
| start_raw_server/5 | |
| start_raw_server/7 | |
| start_server/3 | Start a new UBF contract-using server. |
| start_server/4 | |
| stop_server/1 |
cold_start(Parent, Name, Port, Max, Fun, PacketType, PacketSize) -> any()
server_children(Name) -> any()
server_children(Pid, Timeout) -> any()
server_port(Name) -> any()
server_port(Pid, Timeout) -> any()
server_status(Name) -> any()
server_status(Pid, Timeout) -> any()
start_child(Parent, Listen, Fun) -> any()
start_raw_server(Port, Max, Fun, PacketType, PacketSize) -> any()
start_raw_server(Name, Port, Max, SpawnOpts, Fun, PacketType, PacketSize) -> any()
start_server(Port, Max, Fun) -> any()
Start a new UBF contract-using server.
Fun = fun(Socket) -> exit(normal) | exit(socket_closed) | exit({socket_error, Reason}) | exit(timeout). This fun will handle all of the protocol communication for a single TCP session.
A raw server uses packet length 0 (see start_raw_server/5 and start_raw_server/7).start_server(Name, Port, Max, Fun) -> any()
stop_server(Pid) -> any()
Generated EDoc, $Id$