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() = 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}] | Reason
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. If specific service info returns {error, Reason},  Info
48              will contain Reason term.
49
50       service_names() -> [Service]
51
52              Types:
53
54                 Service = service()
55
56              Returns a list of available service names.
57
58       start() ->
59       start(Type) -> ok | {error, Reason}
60
61              Types:
62
63                 Type = permanent | transient | temporary
64
65              Starts  the  Inets  application.  Default type is temporary. See
66              also application(3).
67
68       start(Service, ServiceConfig) -> {ok, Pid} | {error, Reason}
69       start(Service, ServiceConfig, How) -> {ok, Pid} | {error, Reason}
70
71              Types:
72
73                 Service = service()
74                 ServiceConfig = [{Option, Value}]
75                 Option = property()
76                 Value = term()
77                 How = inets | stand_alone - default is inets.
78
79              Dynamically starts an Inets service after the Inets  application
80              has been started.
81
82          Note:
83              Dynamically  started  services  are  not  handled by application
84              takeover and failover behavior when Inets is run as  a  distrib‐
85              uted  application. Nor are they automatically restarted when the
86              Inets application is restarted. As long as the Inets application
87              is  operational,  they  are  supervised and can be soft code up‐
88              graded.
89
90              A service started as stand_alone, that is, the  service  is  not
91              started  as part of the Inets application, lose all OTP applica‐
92              tion benefits, such as soft upgrade. The stand_alone-service  is
93              linked  to the process that started it. Usually some supervision
94              functionality is still in place and in some  sense  the  calling
95              process becomes the top supervisor.
96
97
98       stop() -> ok
99
100              Stops the Inets application. See also application(3).
101
102       stop(Service, Reference) -> ok | {error, Reason}
103
104              Types:
105
106                 Service = service() | stand_alone
107                 Reference = pid() | term() - service-specified reference
108                 Reason = term()
109
110              Stops a started service of the Inets application or takes down a
111              stand_alone-service gracefully. When option stand_alone is  used
112              in start, only the pid is a valid argument to stop.
113

SEE ALSO

115       httpc(3), httpd(3)
116
117
118
119Ericsson AB                       inets 7.5.3                         inets(3)
Impressum