summaryrefslogtreecommitdiff
path: root/lib/inets/doc/src/inets.xml
blob: 137381cbe9c60424e235964f841c07f1d29addac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">

<erlref>
  <header>
    <copyright>
      <year>2007</year><year>2016</year>
      <holder>Ericsson AB. All Rights Reserved.</holder>
    </copyright>
    <legalnotice>
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at
 
          http://www.apache.org/licenses/LICENSE-2.0

      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.
    
    </legalnotice>

    <title>inets</title>
    <prepared>Ingela Anderton Andin</prepared>
    <responsible></responsible>
    <docno></docno>
    <date></date>
    <rev></rev>
  </header>
  <module>inets</module>
  <modulesummary>The Inets services API.</modulesummary>
  <description>
    <p>This module provides the most basic API to the 
    clients and servers that are part of the <c>Inets</c> application,
    such as start and stop.</p>

    <marker id="common_data_types"></marker>
  </description>

  <section>
    <title>DATA TYPES</title>
    <p>Type definitions that are used more than once in
      this module:</p>
    <p><c>service() = ftpc | tftp | httpc | httpd</c></p>
    <p><c>property() = atom()</c></p>
    <marker id="functions"></marker>
    <marker id="services"></marker>
  </section>

  <funcs>
    <func>
      <name>services() -> [{Service, Pid}]</name>
      <fsummary>Returns a list of currently running services.</fsummary>
      <type>
        <v>Service = service()</v>
        <v>Pid = pid()</v>
      </type>
      <desc>
        <p>Returns a list of currently running services.</p>
        <note>
	  <p>Services started as <c>stand_alone</c> are not listed.</p>
        </note>

	<marker id="services_info"></marker>
      </desc>
    </func>

    <func>
      <name>services_info() -> [{Service, Pid, Info}]</name>
      <fsummary>Returns a list of currently running services where
      each service is described by an <c>[{Option, Value}]</c>
      list.</fsummary>
      <type>
        <v>Service = service()</v>
        <v>Pid = pid()</v>
        <v>Info = [{Option, Value}]</v>
        <v>Option = property()</v>
        <v>Value = term()</v>
      </type>
      <desc>
        <p>Returns a list of currently running services where each
	service is described by an <c>[{Option, Value}]</c> 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.</p>

	<marker id="service_names"></marker>
      </desc>
    </func>
    
    <func>
      <name>service_names() -> [Service] </name>
      <fsummary>Returns a list of available service names.</fsummary>
      <type>
	<v>Service = service()</v>
      </type>
      <desc>
        <p>Returns a list of available service names.</p>

	<marker id="start"></marker>
      </desc>
    </func>
    
    <func>
      <name>start() -> </name>
      <name>start(Type) -> ok | {error, Reason}</name>
      <fsummary>Starts the <c>Inets</c> application.</fsummary>
      <type>
        <v>Type = permanent | transient | temporary</v>
      </type>
      <desc>
        <p>Starts the <c>Inets</c> application. Default type
	is <c>temporary</c>. See also
	<seealso marker="kernel:application">application(3)</seealso>.</p>

	<marker id="stop"></marker>
      </desc>
    </func>

    <func>
      <name>start(Service, ServiceConfig) -> {ok, Pid} | {error, Reason}</name>
      <name>start(Service, ServiceConfig, How) -> {ok, Pid} | {error, Reason}</name>
      <fsummary>Dynamically starts an <c>Inets</c>
      service after the <c>Inets</c> application has been started.</fsummary>
      <type>
        <v>Service = service()</v>
        <v>ServiceConfig = [{Option, Value}]</v>
	<v>Option = property()</v>
	<v>Value = term()</v>
        <v>How = inets | stand_alone - default is inets.</v>
      </type>
      <desc>
        <p>Dynamically starts an <c>Inets</c> service after the <c>Inets</c>
          application has been started.</p>
        <note>
          <p>Dynamically started services are not handled by
            application takeover and failover behavior when <c>Inets</c> is
            run as a distributed application. Nor are they
            automatically restarted when the <c>Inets</c> application is
            restarted. As long as the <c>Inets</c> application is operational,
	    they are supervised and can be soft code upgraded.</p>
	    <p>A service started as <c>stand_alone</c>, that is, the service 
	    is not started as part of the <c>Inets</c> application, 
	    lose all OTP application benefits, such as soft upgrade. 
	    The <c>stand_alone</c>-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.</p>
        </note>
	
	<marker id="stop2"></marker>
      </desc>
    </func>

     <func>
      <name>stop() -> ok </name>
      <fsummary>Stops the <c>Inets</c> application.</fsummary>
      <desc>
        <p>Stops the <c>Inets</c> application. See also
	<seealso marker="kernel:application">application(3)</seealso>.</p>
	
	<marker id="start2"></marker>
      </desc>
    </func>
    
    <func>
      <name>stop(Service, Reference) -> ok | {error, Reason} </name>
      <fsummary>Stops a started service of the <c>Inets</c> application or takes
          down a <c>stand_alone </c>service gracefully.</fsummary>
      <type>
	<v>Service = service() | stand_alone</v>
	<v>Reference = pid() | term() - service-specified reference</v>
	<v>Reason = term()</v>
      </type>
      <desc>
        <p>Stops a started service of the <c>Inets</c> application or takes
	down a <c>stand_alone</c>-service gracefully. When option
	<c>stand_alone</c> is used in start,
	only the pid is a valid argument to stop.</p>
	
	<marker id="see_also"></marker>
      </desc>
    </func>
  </funcs>

  <section>
    <title>SEE ALSO</title>
    <p><seealso marker="ftp">ftp(3)</seealso>,
      <seealso marker="httpc">httpc(3)</seealso>,
      <seealso marker="httpd">httpd(3)</seealso>,
      <seealso marker="tftp">tftp(3)</seealso></p>
  </section>
  
</erlref>