1inets(3)                   Erlang Module Definition                   inets(3)
2
3
4

NAME

6       inets - The Inets services API.
7

DESCRIPTION

9       This module provides the most basic API to the clients and servers that
10       are part of the Inets application, such as start and stop.
11

DATA TYPES

13       Type definitions that are used more than once in this module:
14
15       service() = ftpc | tftp | httpc | httpd
16
17       property() = atom()
18

EXPORTS

20       services() -> [{Service, Pid}]
21
22              Types:
23
24                 Service = service()
25                 Pid = pid()
26
27              Returns a list of currently running services.
28
29          Note:
30              Services started as stand_alone are not listed.
31
32
33       services_info() -> [{Service, Pid, Info}]
34
35              Types:
36
37                 Service = service()
38                 Pid = pid()
39                 Info = [{Option, Value}]
40                 Option = property()
41                 Value = term()
42
43              Returns a list of currently running services where each  service
44              is  described  by  an [{Option, Value}] list. The information in
45              the list is specific for each service and each service has prob‐
46              ably  its  own  info  function that gives more details about the
47              service.
48
49       service_names() -> [Service]
50
51              Types:
52
53                 Service = service()
54
55              Returns a list of available service names.
56
57       start() ->
58       start(Type) -> ok | {error, Reason}
59
60              Types:
61
62                 Type = permanent | transient | temporary
63
64              Starts the Inets application. Default  type  is  temporary.  See
65              also application(3).
66
67       start(Service, ServiceConfig) -> {ok, Pid} | {error, Reason}
68       start(Service, ServiceConfig, How) -> {ok, Pid} | {error, Reason}
69
70              Types:
71
72                 Service = service()
73                 ServiceConfig = [{Option, Value}]
74                 Option = property()
75                 Value = term()
76                 How = inets | stand_alone - default is inets.
77
78              Dynamically  starts an Inets service after the Inets application
79              has been started.
80
81          Note:
82              Dynamically started services  are  not  handled  by  application
83              takeover  and  failover behavior when Inets is run as a distrib‐
84              uted application. Nor are they automatically restarted when  the
85              Inets application is restarted. As long as the Inets application
86              is operational,  they  are  supervised  and  can  be  soft  code
87              upgraded.
88
89              A  service  started  as stand_alone, that is, the service is not
90              started as part of the Inets application, lose all OTP  applica‐
91              tion  benefits, such as soft upgrade. The stand_alone-service is
92              linked to the process that started it. Usually some  supervision
93              functionality  is  still  in place and in some sense the calling
94              process becomes the top supervisor.
95
96
97       stop() -> ok
98
99              Stops the Inets application. See also application(3).
100
101       stop(Service, Reference) -> ok | {error, Reason}
102
103              Types:
104
105                 Service = service() | stand_alone
106                 Reference = pid() | term() - service-specified reference
107                 Reason = term()
108
109              Stops a started service of the Inets application or takes down a
110              stand_alone-service  gracefully. When option stand_alone is used
111              in start, only the pid is a valid argument to stop.
112

SEE ALSO

114       httpc(3), httpd(3)
115
116
117
118Ericsson AB                       inets 7.1.3                         inets(3)
Impressum