.TH inets 3erl "inets 8.3.1.3" "Ericsson AB" "Erlang Module Definition" .SH NAME inets \- The Inets services API. .SH DESCRIPTION .LP This module provides the most basic API to the clients and servers that are part of the \fIInets\fR\& application, such as start and stop\&. .SH "DATA TYPES" .LP Type definitions that are used more than once in this module: .LP \fIservice() = httpc | httpd\fR\& .LP \fIproperty() = atom()\fR\& .SH EXPORTS .LP .B services() -> [{Service, Pid}] .br .RS .LP Types: .RS 3 Service = service() .br Pid = pid() .br .RE .RE .RS .LP Returns a list of currently running services\&. .LP .RS -4 .B Note: .RE Services started as \fIstand_alone\fR\& are not listed\&. .RE .LP .B services_info() -> [{Service, Pid, Info}] .br .RS .LP Types: .RS 3 Service = service() .br Pid = pid() .br Info = [{Option, Value}] | Reason .br Option = property() .br Value = term() .br .RE .RE .RS .LP Returns a list of currently running services where each service is described by an \fI[{Option, Value}]\fR\& list\&. The information in the list is specific for each service and each service has probably its own info function that gives more details about the service\&. If specific service info returns {error, Reason}, Info will contain Reason term\&. .RE .LP .B service_names() -> [Service] .br .RS .LP Types: .RS 3 Service = service() .br .RE .RE .RS .LP Returns a list of available service names\&. .RE .LP .B start() -> .br .B start(Type) -> ok | {error, Reason} .br .RS .LP Types: .RS 3 Type = permanent | transient | temporary .br .RE .RE .RS .LP Starts the \fIInets\fR\& application\&. Default type is \fItemporary\fR\&\&. See also application(3erl)\&. .RE .LP .B start(Service, ServiceConfig) -> {ok, Pid} | {error, Reason} .br .B start(Service, ServiceConfig, How) -> {ok, Pid} | {error, Reason} .br .RS .LP Types: .RS 3 Service = service() .br ServiceConfig = [{Option, Value}] .br Option = property() .br Value = term() .br How = inets | stand_alone - default is inets\&. .br .RE .RE .RS .LP Dynamically starts an \fIInets\fR\& service after the \fIInets\fR\& application has been started\&. .LP .RS -4 .B Note: .RE Dynamically started services are not handled by application takeover and failover behavior when \fIInets\fR\& is run as a distributed application\&. Nor are they automatically restarted when the \fIInets\fR\& application is restarted\&. As long as the \fIInets\fR\& application is operational, they are supervised and can be soft code upgraded\&. .LP A service started as \fIstand_alone\fR\&, that is, the service is not started as part of the \fIInets\fR\& application, lose all OTP application benefits, such as soft upgrade\&. The \fIstand_alone\fR\&-service is linked to the process that started it\&. Usually some supervision functionality is still in place and in some sense the calling process becomes the top supervisor\&. .RE .LP .B stop() -> ok .br .RS .LP Stops the \fIInets\fR\& application\&. See also application(3erl)\&. .RE .LP .B stop(Service, Reference) -> ok | {error, Reason} .br .RS .LP Types: .RS 3 Service = service() | stand_alone .br Reference = pid() | term() - service-specified reference .br Reason = term() .br .RE .RE .RS .LP Stops a started service of the \fIInets\fR\& application or takes down a \fIstand_alone\fR\&-service gracefully\&. When option \fIstand_alone\fR\& is used in start, only the pid is a valid argument to stop\&. .RE .SH "SEE ALSO" .LP httpc(3erl), httpd(3erl)