diff options
author | Lukas Larsson <[email protected]> | 2011-05-18 16:21:34 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2011-05-18 16:21:34 +0200 |
commit | 15426ac367eed736c165a5bdbb1c051a87944f68 (patch) | |
tree | fcabce7847168a8416600fe35f94a411a5f73d6e /lib/kernel/doc/src/gen_udp.xml | |
parent | 4cd0717b717803ce8f03a12de4bf89f452ed1df7 (diff) | |
parent | f44bbb331fb517e989d4d906b7f63ec110bbbc18 (diff) | |
download | otp-15426ac367eed736c165a5bdbb1c051a87944f68.tar.gz otp-15426ac367eed736c165a5bdbb1c051a87944f68.tar.bz2 otp-15426ac367eed736c165a5bdbb1c051a87944f68.zip |
Merge branch 'dev' of super:otp into dev
* 'dev' of super:otp: (166 commits)
Corrected documentation error and added examples to Users Guide
In TLS 1.1, failure to properly close a connection no longer requires that a session not be resumed. This is a change from TLS 1.0 to conform with widespread implementation practice. Erlang ssl will now in TLS 1.0 conform to the widespread implementation practice instead of the specification to avoid performance issues.
Add escript to bootstrap/bin
Remove unused variable warning in inet_res
Remove unused variable in epmd_port
Remove compiler warnings in inet_drv
Add SASL test suite
Allow same module name in multiple applications if explicitely excluded
Fix bugs concerning the option report_missing_types
Fix default encoding in SAX parser.
re: remove gratuitous "it " in manpage
Spelling in (backward *compatibility*) comment.
Improve erl_docgen's support for Dialyzer specs and types
dialyzer warning on mnesia_tm
Add documentation text about majority checking
add mnesia_majority_test suite
where_to_wlock optimization + change_table_majority/2
bug in mnesia_tm:needs_majority/2
optimize sticky_lock maj. check
check majority for sticky locks
...
Diffstat (limited to 'lib/kernel/doc/src/gen_udp.xml')
-rw-r--r-- | lib/kernel/doc/src/gen_udp.xml | 101 |
1 files changed, 44 insertions, 57 deletions
diff --git a/lib/kernel/doc/src/gen_udp.xml b/lib/kernel/doc/src/gen_udp.xml index 71f2e9bd83..c0e783f508 100644 --- a/lib/kernel/doc/src/gen_udp.xml +++ b/lib/kernel/doc/src/gen_udp.xml @@ -4,7 +4,7 @@ <erlref> <header> <copyright> - <year>1997</year><year>2009</year> + <year>1997</year><year>2011</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -34,32 +34,43 @@ with sockets using the UDP protocol.</p> </description> - <section> - <title>DATA TYPES</title> - <code type="none"> -ip_address() - see inet(3) - -posix() - see inet(3) + <datatypes> + <datatype> + <name name="hostname"/> + </datatype> + <datatype> + <name name="ip_address"/> + <desc> + <p>Represents an address of a TCP socket. + It is a tuple as explained in + <seealso marker="inet">inet(3)</seealso>.</p> + </desc> + </datatype> + <datatype> + <name name="port_number"/> + </datatype> + <datatype> + <name name="posix"/> + <desc> + <p>See <seealso marker="inet#error_codes"> + inet(3); POSIX Error Codes</seealso>.</p> + </desc> + </datatype> + <datatype> + <name><marker id="type-socket">socket()</marker></name> + <desc> + <p>As returned by open/1,2.</p> + </desc> + </datatype> + </datatypes> -socket() - as returned by open/1,2</code> - </section> <funcs> <func> - <name>open(Port) -> {ok, Socket} | {error, Reason}</name> - <name>open(Port, Options) -> {ok, Socket} | {error, Reason}</name> + <name name="open" arity="1"/> + <name name="open" arity="2"/> <fsummary>Associate a UDP port number with the process calling it</fsummary> - <type> - <v>Port = 0..65535</v> - <v>Options = [Opt]</v> - <v> Opt -- see below</v> - <v>Socket = socket()</v> - <v>Reason = posix()</v> - </type> <desc> - <p>Associates a UDP port number (<c>Port</c>) with the calling + <p>Associates a UDP port number (<c><anno>Port</anno></c>) with the calling process.</p> <p>The available options are:</p> <taglist> @@ -96,7 +107,7 @@ socket() <seealso marker="inet#setopts/2">inet:setopts/2</seealso>.</p> </item> </taglist> - <p>The returned socket <c>Socket</c> is used to send packets + <p>The returned socket <c><anno>Socket</anno></c> is used to send packets from this port with <c>send/4</c>. When UDP packets arrive at the opened port, they are delivered as messages:</p> <code type="none"> @@ -110,66 +121,42 @@ socket() binary if the option <c>binary</c> was specified.</p> <p>Default value for the receive buffer option is <c>{recbuf, 8192}</c>.</p> - <p>If <c>Port == 0</c>, the underlying OS assigns a free UDP + <p>If <c><anno>Port</anno> == 0</c>, the underlying OS assigns a free UDP port, use <c>inet:port/1</c> to retrieve it.</p> </desc> </func> <func> - <name>send(Socket, Address, Port, Packet) -> ok | {error, Reason}</name> + <name name="send" arity="4"/> <fsummary>Send a packet</fsummary> - <type> - <v>Socket = socket()</v> - <v>Address = string() | atom() | ip_address()</v> - <v>Port = 0..65535</v> - <v>Packet = [char()] | binary()</v> - <v>Reason = not_owner | posix()</v> - </type> <desc> <p>Sends a packet to the specified address and port. - The <c>Address</c> argument can be either a hostname, or an + The <c><anno>Address</anno></c> argument can be either a hostname, or an IP address.</p> </desc> </func> <func> - <name>recv(Socket, Length) -> {ok, {Address, Port, Packet}} | {error, Reason}</name> - <name>recv(Socket, Length, Timeout) -> {ok, {Address, Port, Packet}} | {error, Reason}</name> + <name name="recv" arity="2"/> + <name name="recv" arity="3"/> <fsummary>Receive a packet from a passive socket</fsummary> - <type> - <v>Socket = socket()</v> - <v>Length = int()</v> - <v>Address = ip_address()</v> - <v>Port = 0..65535</v> - <v>Packet = [char()] | binary()</v> - <v>Timeout = int() | infinity</v> - <v>Reason = not_owner | posix()</v> - </type> <desc> <p>This function receives a packet from a socket in passive mode.</p> - <p>The optional <c>Timeout</c> parameter specifies a timeout in + <p>The optional <c><anno>Timeout</anno></c> parameter specifies a timeout in milliseconds. The default value is <c>infinity</c>.</p> </desc> </func> <func> - <name>controlling_process(Socket, Pid) -> ok</name> + <name name="controlling_process" arity="2"/> <fsummary>Change controlling process of a socket</fsummary> - <type> - <v>Socket = socket()</v> - <v>Pid = pid()</v> - </type> <desc> - <p>Assigns a new controlling process <c>Pid</c> to - <c>Socket</c>. The controlling process is the process which + <p>Assigns a new controlling process <c><anno>Pid</anno></c> to + <c><anno>Socket</anno></c>. The controlling process is the process which receives messages from the socket.</p> </desc> </func> <func> - <name>close(Socket) -> ok | {error, Reason}</name> + <name name="close" arity="1"/> <fsummary>Close a UDP socket</fsummary> - <type> - <v>Socket = socket()</v> - <v>Reason = not_owner | posix()</v> - </type> <desc> <p>Closes a UDP socket.</p> </desc> |