Skip to content

Latest commit

 

History

History
112 lines (52 loc) · 2.18 KB

peculium_core_peer_pool.md

File metadata and controls

112 lines (52 loc) · 2.18 KB

Module peculium_core_peer_pool

Peer Pool. Copyright (c) 2013 Alexander Færøy

Behaviours: ranch_protocol, supervisor.

Authors: Alexander Færøy (ahf@0x90.dk).

Description

This module contains a supervisor for supervising peculium_core_peer servers.

Data Types


startlink_err() = {already_started, pid()} | shutdown | term()

startlink_ret() = {ok, pid()} | ignore | {error, startlink_err()}

Function Index

init/1
spawn_peer/2
spawn_peer/4
start_link/0

Function Details

init/1


init(State::[]) -> {ok, {{simple_one_for_one, non_neg_integer(), non_neg_integer()}, []}}



spawn_peer/2


spawn_peer(Address::inet:ip_address(), Port::inet:port_number()) -> {ok, pid()} | {error, term()}



spawn_peer/4


spawn_peer(ListenerPid::pid(), Socket::inet:socket(), Transport::term(), Options::[term()]) -> {ok, pid()} | {error, term()}



start_link/0


start_link() -> startlink_ret()