aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/doc/src/inets.xml
blob: e5fe32f32f9fe8806587b09d3545a04b83e6cfb9 (plain) (blame)
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
<?xml version="1.0" encoding="latin1" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">

<erlref>
  <header>
    <copyright>
      <year>2007</year><year>2009</year>
      <holder>Ericsson AB. All Rights Reserved.</holder>
    </copyright>
    <legalnotice>
      The contents of this file are subject to the Erlang Public License,
      Version 1.1, (the "License"); you may not use this file except in
      compliance with the License. You should have received a copy of the
      Erlang Public License along with this software. If not, it can be
      retrieved online at http://www.erlang.org/.
    
      Software distributed under the License is distributed on an "AS IS"
      basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
      the License for the specific language governing rights 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 Inets application,
      such as start and stop. </p>
  </description>

  <section>
    <title>COMMON DATA TYPES </title>
    <p>Type definitions that are used more than once in
      this module: </p>
    <p><c> service() = ftpc | tfptd | httpc | httpd</c></p>
    <p><c> property() = atom() </c></p>
  </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> will not
            be listed.</p>
        </note>
      </desc>
    </func>
    <func>
      <name>services_info() -> [{Service, Pid, Info}]</name>
      <fsummary>Returns a list of currently running services where
      each service is described by a [{Option, Value}]
      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 a [{Option, Value}] list. The
          information given in the list is specific for each service
          and it is probable that each service will have its own info
          function that gives you even more details about the
          service.</p>
      </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>
      </desc>
    </func>
    
    <func>
      <name>start() -> </name>
      <name>start(Type) -> ok | {error, Reason}</name>
      <fsummary>Starts the Inets application. </fsummary>
      <type>
        <v>Type =  permanent | transient | temporary</v>
      </type>
      <desc>
        <p>Starts the Inets application. Default type
          is temporary. See also
          <seealso marker="kernel:application">application(3)</seealso></p>
      </desc>
    </func>
    <func>
      <name>stop() -> ok </name>
      <fsummary>Stops the inets application.</fsummary>
      <desc>
        <p>Stops the inets application. See also
          <seealso marker="kernel:application">application(3)</seealso></p>
      </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 inets
	service after the inets 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 inets service after the inets
          application has been started.\011</p>
        <note>
          <p>Dynamically started services will not be handled by
            application takeover and failover behavior when inets is
            run as a distributed application. Nor will they be
            automatically restarted when the inets application is
            restarted, but as long as the inets application is up and
            running they will be supervised and may be soft code
            upgraded. Services started as <c>stand_alone</c>,
            e.i. the service is not started as part of the inets
            application, will lose all OTP application benefits such
            as soft upgrade. The "stand_alone-service" will be linked to
            the process that started it. In most cases some of the
            supervision functionality will still be in place and in
            some sense the calling process has now become the top
            supervisor.</p>
        </note>
      </desc>
    </func>
    <func>
      <name>stop(Service, Reference) -> ok | {error, Reason} </name>
      <fsummary>Stops a started service of the inets application or takes
          down a "stand_alone-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 inets application or takes
          down a "stand_alone-service" gracefully. When the
	  <c>stand_alone</c> option is used in start,
	  only the pid is a valid argument to stop.</p>
      </desc>
    </func>
  </funcs>

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