~statik/ubuntu/maverick/erlang/erlang-merge-testing

« back to all changes in this revision

Viewing changes to lib/megaco/doc/src/megaco_tcp.xml

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-05-01 10:14:38 UTC
  • mfrom: (3.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20090501101438-6qlr6rsdxgyzrg2z
Tags: 1:13.b-dfsg-2
* Cleaned up patches: removed unneeded patch which helped to support
  different SCTP library versions, made sure that changes for m68k
  architecture applied only when building on this architecture.
* Removed duplicated information from binary packages descriptions.
* Don't require libsctp-dev build-dependency on solaris-i386 architecture
  which allows to build Erlang on Nexenta (thanks to Tim Spriggs for
  the suggestion).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="latin1" ?>
 
2
<!DOCTYPE erlref SYSTEM "erlref.dtd">
 
3
 
 
4
<erlref>
 
5
  <header>
 
6
    <copyright>
 
7
      <year>2000</year><year>2009</year>
 
8
      <holder>Ericsson AB. All Rights Reserved.</holder>
 
9
    </copyright>
 
10
    <legalnotice>
 
11
      The contents of this file are subject to the Erlang Public License,
 
12
      Version 1.1, (the "License"); you may not use this file except in
 
13
      compliance with the License. You should have received a copy of the
 
14
      Erlang Public License along with this software. If not, it can be
 
15
      retrieved online at http://www.erlang.org/.
 
16
    
 
17
      Software distributed under the License is distributed on an "AS IS"
 
18
      basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
 
19
      the License for the specific language governing rights and limitations
 
20
      under the License.
 
21
    
 
22
    </legalnotice>
 
23
 
 
24
    <title>megaco_tcp</title>
 
25
    <prepared>Lars Thors&eacute;n</prepared>
 
26
    <responsible>Lars Thors&eacute;n</responsible>
 
27
    <docno></docno>
 
28
    <approved>Lars Thors&eacute;n</approved>
 
29
    <checked></checked>
 
30
    <date>2007-06-15</date>
 
31
    <rev>%VSN%</rev>
 
32
    <file>megaco_tcp.xml</file>
 
33
  </header>
 
34
  <module>megaco_tcp</module>
 
35
  <modulesummary>Interface module to TPKT transport protocol for Megaco/H.248.</modulesummary>
 
36
  <description>
 
37
    <p>This module contains the public interface to the TPKT (TCP/IP) version
 
38
      transport protocol for Megaco/H.248.</p>
 
39
  </description>
 
40
  <funcs>
 
41
    <func>
 
42
      <name>start_transport() -> {ok, TransportRef}</name>
 
43
      <fsummary></fsummary>
 
44
      <type>
 
45
        <v>TransportRef = pid()</v>
 
46
      </type>
 
47
      <desc>
 
48
        <p>This function is used for starting the TCP/IP transport service.
 
49
          Use exit(TransportRef, Reason) to stop the transport service.</p>
 
50
      </desc>
 
51
    </func>
 
52
    <func>
 
53
      <name>listen(TransportRef, ListenPortSpecList) -> ok</name>
 
54
      <fsummary></fsummary>
 
55
      <type>
 
56
        <v>TransportRef = pid() | regname()</v>
 
57
        <v>OptionListPerPort = [Option]</v>
 
58
        <v>Option = {port, integer()} |{options, list()} |{receive_handle, term()}</v>
 
59
      </type>
 
60
      <desc>
 
61
        <p>This function is used for starting new TPKT listening socket
 
62
          for TCP/IP.  The option list contains the socket
 
63
          definitions.</p>
 
64
      </desc>
 
65
    </func>
 
66
    <func>
 
67
      <name>connect(TransportRef, OptionList) -> {ok, Handle, ControlPid} |  {error, Reason}</name>
 
68
      <fsummary></fsummary>
 
69
      <type>
 
70
        <v>TransportRef = pid() | regname()</v>
 
71
        <v>OptionList = [Option]</v>
 
72
        <v>Option = {host, Ipaddr} | {port, integer()}  |{options, list()} |{receive_handle, term()} |{module, atom()}</v>
 
73
        <v>Handle = socket_handle()</v>
 
74
        <v>ControlPid = pid()</v>
 
75
        <v>Reason = term()</v>
 
76
      </type>
 
77
      <desc>
 
78
        <p>This function is used to open a TPKT connection.</p>
 
79
        <p>The <c><![CDATA[module]]></c> option makes it possible for the user to provide
 
80
          their own callback module. The <c><![CDATA[receive_message/4]]></c> or
 
81
          <c><![CDATA[process_received_message/4]]></c> functions of this module is called 
 
82
          when a new message is received (which one depends on the size of the 
 
83
          message; small - receive_message, large - process_received_message). 
 
84
          Default value is <em>megaco</em>.</p>
 
85
      </desc>
 
86
    </func>
 
87
    <func>
 
88
      <name>close(Handle) -> ok</name>
 
89
      <fsummary></fsummary>
 
90
      <type>
 
91
        <v>Handle = socket_handle()</v>
 
92
      </type>
 
93
      <desc>
 
94
        <p>This function is used for closing an active TPKT connection.</p>
 
95
      </desc>
 
96
    </func>
 
97
    <func>
 
98
      <name>socket(Handle) -> Socket</name>
 
99
      <fsummary></fsummary>
 
100
      <type>
 
101
        <v>Handle = socket_handle()</v>
 
102
        <v>Socket = inet_socket()</v>
 
103
      </type>
 
104
      <desc>
 
105
        <p>This function is used to convert a socket_handle() to
 
106
          a inet_socket(). inet_socket() is a plain socket,
 
107
          see the inet module for more info.</p>
 
108
      </desc>
 
109
    </func>
 
110
    <func>
 
111
      <name>send_message(Handle, Message) -> ok</name>
 
112
      <fsummary></fsummary>
 
113
      <type>
 
114
        <v>Handle = socket_handle()</v>
 
115
        <v>Message = binary() | iolist()</v>
 
116
      </type>
 
117
      <desc>
 
118
        <p>Sends a message on a connection.</p>
 
119
      </desc>
 
120
    </func>
 
121
    <func>
 
122
      <name>block(Handle) -> ok</name>
 
123
      <fsummary></fsummary>
 
124
      <type>
 
125
        <v>Handle = socket_handle()</v>
 
126
      </type>
 
127
      <desc>
 
128
        <p>Stop receiving incomming messages on the socket.</p>
 
129
      </desc>
 
130
    </func>
 
131
    <func>
 
132
      <name>unblock(Handle) -> ok</name>
 
133
      <fsummary></fsummary>
 
134
      <type>
 
135
        <v>Handle = socket_handle()</v>
 
136
      </type>
 
137
      <desc>
 
138
        <p>Starting to receive incomming messages from the socket again.</p>
 
139
        <marker id="upgrade_receive_handle"></marker>
 
140
      </desc>
 
141
    </func>
 
142
    <func>
 
143
      <name>upgrade_receive_handle(ControlPid) -> ok</name>
 
144
      <fsummary></fsummary>
 
145
      <type>
 
146
        <v>ControlPid = pid()</v>
 
147
      </type>
 
148
      <desc>
 
149
        <p>Update the receive handle of the control process (e.g. after
 
150
          having changed protocol version).</p>
 
151
        <marker id="stats"></marker>
 
152
      </desc>
 
153
    </func>
 
154
    <func>
 
155
      <name>get_stats() -> {ok, TotalStats} | {error, Reason}</name>
 
156
      <name>get_stats(SendHandle) -> {ok, SendHandleStats} | {error, Reason}</name>
 
157
      <name>get_stats(SendHandle, Counter) -> {ok, CounterStats} | {error, Reason}</name>
 
158
      <fsummary></fsummary>
 
159
      <type>
 
160
        <v>TotalStats = [send_handle_stats()]</v>
 
161
        <v>total_stats() = {send_handle(), [stats()]}</v>
 
162
        <v>SendHandle = send_handle()</v>
 
163
        <v>SendHandleStats = [stats()]</v>
 
164
        <v>Counter = tcp_stats_counter()</v>
 
165
        <v>CounterStats = integer()</v>
 
166
        <v>stats() = {tcp_stats_counter(), integer()}</v>
 
167
        <v>tcp_stats_counter() = medGwyGatewayNumInMessages |  medGwyGatewayNumInOctets | medGwyGatewayNumOutMessages | medGwyGatewayNumOutOctets | medGwyGatewayNumErrors</v>
 
168
        <v>Reason = term()</v>
 
169
      </type>
 
170
      <desc>
 
171
        <p>Retreive the TCP related (SNMP) statistics counters.</p>
 
172
      </desc>
 
173
    </func>
 
174
    <func>
 
175
      <name>reset_stats() -> void()</name>
 
176
      <name>reset_stats(SendHandle) -> void()</name>
 
177
      <fsummary></fsummary>
 
178
      <type>
 
179
        <v>SendHandle = send_handle()</v>
 
180
      </type>
 
181
      <desc>
 
182
        <p>Reset all TCP related (SNMP) statistics counters.</p>
 
183
      </desc>
 
184
    </func>
 
185
  </funcs>
 
186
 
 
187
</erlref>
 
188