From dbf9c223cf7efd8fc6143b573fcc12637d5ae9ae Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Thu, 15 Mar 2012 12:00:58 +0100 Subject: [inets] Some documentation cleanup OTP-9983 --- lib/inets/doc/src/book.xml | 4 +- lib/inets/doc/src/fascicules.xml | 2 +- lib/inets/doc/src/ftp_client.xml | 4 +- lib/inets/doc/src/httpd_conf.xml | 58 ++++++---- lib/inets/doc/src/httpd_socket.xml | 29 +++-- lib/inets/doc/src/httpd_util.xml | 4 +- lib/inets/doc/src/inets_services.xml | 4 +- lib/inets/doc/src/mod_alias.xml | 92 +++++++++------ lib/inets/doc/src/mod_auth.xml | 133 +++++++++++++-------- lib/inets/doc/src/notes_history.xml | 4 +- lib/inets/doc/src/part.xml | 4 +- lib/inets/doc/src/part_notes.xml | 4 +- lib/inets/doc/src/part_notes_history.xml | 4 +- lib/inets/doc/src/tftp.xml | 191 +++++++++++++++++++------------ 14 files changed, 331 insertions(+), 206 deletions(-) (limited to 'lib/inets/doc') diff --git a/lib/inets/doc/src/book.xml b/lib/inets/doc/src/book.xml index 7da0abd98f..51cbb2d963 100644 --- a/lib/inets/doc/src/book.xml +++ b/lib/inets/doc/src/book.xml @@ -1,10 +1,10 @@ - +
- 19972009 + 19972012 Ericsson AB. All Rights Reserved. diff --git a/lib/inets/doc/src/fascicules.xml b/lib/inets/doc/src/fascicules.xml index 101e745722..ea3b988882 100644 --- a/lib/inets/doc/src/fascicules.xml +++ b/lib/inets/doc/src/fascicules.xml @@ -1,4 +1,4 @@ - + diff --git a/lib/inets/doc/src/ftp_client.xml b/lib/inets/doc/src/ftp_client.xml index 7f62a453a6..b44674d997 100644 --- a/lib/inets/doc/src/ftp_client.xml +++ b/lib/inets/doc/src/ftp_client.xml @@ -1,10 +1,10 @@ - +
- 20042009 + 20042012 Ericsson AB. All Rights Reserved. diff --git a/lib/inets/doc/src/httpd_conf.xml b/lib/inets/doc/src/httpd_conf.xml index a1ad76a8ae..fc34f14ec3 100644 --- a/lib/inets/doc/src/httpd_conf.xml +++ b/lib/inets/doc/src/httpd_conf.xml @@ -1,10 +1,10 @@ - +
- 19972009 + 19972012 Ericsson AB. All Rights Reserved. @@ -33,11 +33,14 @@ Web server API programmer.

This module provides the Erlang Webserver API programmer with - utility functions for adding run-time configuration directives.

+ utility functions for adding run-time configuration directives.

+ +
+ - check_enum(EnumString,ValidEnumStrings) -> Result + check_enum(EnumString, ValidEnumStrings) -> Result Check if string is a valid enumeration. EnumString = string() @@ -47,10 +50,13 @@

check_enum/2 checks if EnumString is a valid - enumeration of ValidEnumStrings in which case it is - returned as an atom.

+ enumeration of ValidEnumStrings in which case it is + returned as an atom.

+ +
+ clean(String) -> Stripped Remove leading and/or trailing white spaces. @@ -60,9 +66,12 @@

clean/1 removes leading and/or trailing white spaces - from String.

+ from String.

+ +
+ custom_clean(String,Before,After) -> Stripped Remove leading and/or trailing white spaces and custom characters. @@ -73,11 +82,14 @@

custom_clean/3 removes leading and/or trailing white - spaces and custom characters from String. Before - and After are regular expressions, as defined in - regexp(3), describing the custom characters.

+ spaces and custom characters from String. Before + and After are regular expressions, as defined in + regexp(3), describing the custom characters.

+ +
+ is_directory(FilePath) -> Result Check if a file path is a directory. @@ -91,13 +103,16 @@

is_directory/1 checks if FilePath is a - directory in which case it is returned. Please read - file(3) for a description of enoent, - eaccess and enotdir. The definition of - the file info record can be found by including file.hrl - from the kernel application, see file(3).

+ directory in which case it is returned. Please read + file(3) for a description of enoent, + eaccess and enotdir. The definition of + the file info record can be found by including file.hrl + from the kernel application, see file(3).

+ +
+ is_file(FilePath) -> Result Check if a file path is a regular file. @@ -111,13 +126,16 @@

is_file/1 checks if FilePath is a regular - file in which case it is returned. Read file(3) for a - description of enoent, eaccess and - enotdir. The definition of the file info record can be - found by including file.hrl from the kernel application, - see file(3).

+ file in which case it is returned. Read file(3) for a + description of enoent, eaccess and + enotdir. The definition of the file info record can be + found by including file.hrl from the kernel application, + see file(3).

+ +
+ make_integer(String) -> Result Return an integer representation of a string. diff --git a/lib/inets/doc/src/httpd_socket.xml b/lib/inets/doc/src/httpd_socket.xml index fba1a58d3a..58cd2ec575 100644 --- a/lib/inets/doc/src/httpd_socket.xml +++ b/lib/inets/doc/src/httpd_socket.xml @@ -1,10 +1,10 @@ - +
- 19972009 + 19972012 Ericsson AB. All Rights Reserved. @@ -33,10 +33,13 @@ Web server API programmer.

This module provides the Erlang Web server API module programmer - with utility functions for generic sockets communication. The - appropriate communication mechanism is transparently used, that - is ip_comm or ssl.

+ with utility functions for generic sockets communication. The + appropriate communication mechanism is transparently used, that + is ip_comm or ssl.

+ +
+ deliver(SocketType, Socket, Data) -> Result @@ -50,11 +53,14 @@

deliver/3 sends the Binary over the - Socket using the specified SocketType. Socket - and SocketType should be the socket and the socket_type form - the mod record as defined in httpd.hrl

+ Socket using the specified SocketType. Socket + and SocketType should be the socket and the socket_type form + the mod record as defined in httpd.hrl

+ +
+ peername(SocketType,Socket) -> {Port,IPAddress} Return the port and IP-address of the remote socket. @@ -67,9 +73,12 @@

peername/3 returns the Port and - IPAddress of the remote Socket.

+ IPAddress of the remote Socket.

+ +
+ resolve() -> HostName Return the official name of the current host. @@ -79,7 +88,7 @@

resolve/0 returns the official HostName of - the current host.

+ the current host.

diff --git a/lib/inets/doc/src/httpd_util.xml b/lib/inets/doc/src/httpd_util.xml index 6ac2b13c72..9f290084d2 100644 --- a/lib/inets/doc/src/httpd_util.xml +++ b/lib/inets/doc/src/httpd_util.xml @@ -1,10 +1,10 @@ - +
- 19972010 + 19972012 Ericsson AB. All Rights Reserved. diff --git a/lib/inets/doc/src/inets_services.xml b/lib/inets/doc/src/inets_services.xml index c274d67f19..e282050b12 100644 --- a/lib/inets/doc/src/inets_services.xml +++ b/lib/inets/doc/src/inets_services.xml @@ -1,10 +1,10 @@ - +
- 19972009 + 19972012 Ericsson AB. All Rights Reserved. diff --git a/lib/inets/doc/src/mod_alias.xml b/lib/inets/doc/src/mod_alias.xml index c783b99b23..265a1b8e76 100644 --- a/lib/inets/doc/src/mod_alias.xml +++ b/lib/inets/doc/src/mod_alias.xml @@ -1,10 +1,10 @@ - +
- 19972009 + 19972012 Ericsson AB. All Rights Reserved. @@ -32,8 +32,11 @@ URL aliasing.

Erlang Webserver Server internal API for handling of things - such as interaction data exported by the mod_alias module.

+ such as interaction data exported by the mod_alias module.

+ +
+ default_index(ConfigDB, Path) -> NewPath @@ -45,17 +48,20 @@

If Path is a directory, default_index/2, it starts - searching for resources or files that are specified in the config - directive DirectoryIndex. - If an appropriate resource or file is found, it is appended to - the end of Path and then returned. Path is - returned unaltered, if no appropriate - file is found, or if Path is not a directory. - config_db() is the server config file in ETS table format - as described in - Inets Users Guide..

+ searching for resources or files that are specified in the config + directive DirectoryIndex. + If an appropriate resource or file is found, it is appended to + the end of Path and then returned. Path is + returned unaltered, if no appropriate + file is found, or if Path is not a directory. + config_db() is the server config file in ETS table format + as described in + Inets Users Guide..

+ +
+ path(PathData, ConfigDB, RequestURI) -> Path Return the actual file path to a URL. @@ -67,15 +73,19 @@

path/3 returns the actual file Path in the - RequestURI (See RFC 1945). If the interaction data - {real_name,{Path,AfterPath}} has been exported by - mod_alias; - Path is returned. If no interaction data has been - exported, ServerRoot is used to - generate a file Path. config_db() and - interaction_data() are as defined in Inets Users Guide.

+ RequestURI (See RFC 1945). If the interaction data + {real_name,{Path,AfterPath}} has been exported by + mod_alias; + Path is returned. If no interaction data has been + exported, ServerRoot is used to + generate a file Path. config_db() and + interaction_data() are as defined in + Inets Users Guide.

+ +
+ real_name(ConfigDB, RequestURI, Aliases) -> Ret Expand a request uri using Alias config directives. @@ -89,18 +99,24 @@

real_name/3 traverses Aliases, typically - extracted from ConfigDB, and matches each - FakeName with RequestURI. If a match is found - FakeName is replaced with RealName in the - match. The resulting path is split into two parts, that - is ShortPath and AfterPath as defined in httpd_util:split_path/1. - Path is generated from ShortPath, that is - the result from default_index/2 with - ShortPath as an argument. - config_db() is the server config file in ETS table - format as described in Inets User Guide..

+ extracted from ConfigDB, and matches each + FakeName with RequestURI. If a match is found + FakeName is replaced with RealName in the + match. The resulting path is split into two parts, that + is ShortPath and AfterPath as defined in + httpd_util:split_path/1. + Path is generated from ShortPath, that is + the result from + default_index/2 with + ShortPath as an argument. + config_db() is the server config file in ETS table + format as described in + Inets User Guide..

+ +
+ real_script_name(ConfigDB,RequestURI,ScriptAliases) -> Ret Expand a request uri using ScriptAlias config directives. @@ -114,15 +130,15 @@

real_name/3 traverses ScriptAliases, - typically extracted from ConfigDB, and matches each - FakeName with RequestURI. If a match is found - FakeName is replaced with RealName in the - match. If the resulting match is not an executable script - not_a_script is returned. If it is a script the - resulting script path is in two parts, that is - ShortPath and AfterPath as defined in httpd_util:split_script_path/1. - config_db() is the server config file in ETS table - format as described in Inets Users Guide..

+ typically extracted from ConfigDB, and matches each + FakeName with RequestURI. If a match is found + FakeName is replaced with RealName in the + match. If the resulting match is not an executable script + not_a_script is returned. If it is a script the + resulting script path is in two parts, that is + ShortPath and AfterPath as defined in httpd_util:split_script_path/1. + config_db() is the server config file in ETS table + format as described in Inets Users Guide..

diff --git a/lib/inets/doc/src/mod_auth.xml b/lib/inets/doc/src/mod_auth.xml index 2134ebeeae..7801567862 100644 --- a/lib/inets/doc/src/mod_auth.xml +++ b/lib/inets/doc/src/mod_auth.xml @@ -1,4 +1,4 @@ - + @@ -32,8 +32,11 @@ User authentication using text files, dets or mnesia database.

This module provides for basic user authentication using - textual files, dets databases as well as mnesia databases.

+ textual files, dets databases as well as mnesia databases.

+ +
+ add_user(UserName, Options) -> true| {error, Reason} @@ -55,12 +58,17 @@ -

add_user/2, add_user/5 and add_user/6 adds a user to the user - database. If the operation is successful, this function returns - true. If an error occurs, {error,Reason} is returned. When add_user/2 - is called the Password, UserData Port and Dir options is mandatory.

+

add_user/2, add_user/5 and add_user/6 adds a + user to the user + database. If the operation is successful, this function returns + true. If an error occurs, {error,Reason} is returned. + When add_user/2 is called the Password, + UserData Port and Dir options is mandatory.

+ +
+ delete_user(UserName,Options) -> true | {error, Reason} delete_user(UserName, Port, Dir) -> true | {error, Reason} @@ -79,13 +87,16 @@

delete_user/2, delete_user/3 and delete_user/4 - deletes a user - from the user database. If the operation is successful, this - function returns true. If an error occurs, - {error,Reason} is returned. When delete_user/2 is - called the Port and Dir options are mandatory.

+ deletes a user from the user database. + If the operation is successful, this function returns true. + If an error occurs, {error,Reason} is returned. + When delete_user/2 is called the Port and Dir options + are mandatory.

+ +
+ get_user(UserName,Options) -> {ok, #httpd_user} |{error, Reason} get_user(UserName, Port, Dir) -> {ok, #httpd_user} | {error, Reason} @@ -104,12 +115,15 @@

get_user/2, get_user/3 and get_user/4 returns a - httpd_user record containing the userdata for a - specific user. If the user cannot be found, {error, Reason} - is returned. When get_user/2 is called the Port and Dir - options are mandatory.

+ httpd_user record containing the userdata for a + specific user. If the user cannot be found, {error, Reason} + is returned. When get_user/2 is called the Port and Dir + options are mandatory.

+ +
+ list_users(Options) -> {ok, Users} | {error, Reason} list_users(Port, Dir) -> {ok, Users} | {error, Reason} @@ -127,12 +141,16 @@ -

list_users/1, list_users/2 and list_users/3 returns a list - of users in the user database for a specific Port/Dir. - When list_users/1 is called the Port and Dir - options are mandatory.

+

list_users/1, list_users/2 and list_users/3 + returns a list + of users in the user database for a specific Port/Dir. + When list_users/1 is called the Port and Dir + options are mandatory.

+ +
+ add_group_member(GroupName, UserName, Options) -> true | {error, Reason} add_group_member(GroupName, UserName, Port, Dir) -> true | {error, Reason} @@ -151,13 +169,18 @@ -

add_group_member/3, add_group_member/4 and add_group_member/5 - adds a user to a group. If the group does not exist, it - is created and the user is added to the group. Upon successful - operation, this function returns true. When add_group_members/3 - is called the Port and Dir options are mandatory.

+

add_group_member/3, add_group_member/4 and + add_group_member/5 + adds a user to a group. If the group does not exist, it + is created and the user is added to the group. Upon successful + operation, this function returns true. + When add_group_members/3 + is called the Port and Dir options are mandatory.

+ +
+ delete_group_member(GroupName, UserName, Options) -> true | {error, Reason} delete_group_member(GroupName, UserName, Port, Dir) -> true | {error, Reason} @@ -176,13 +199,17 @@ -

delete_group_member/3, delete_group_member/4 and delete_group_member/5 deletes a user from a group. - If the group or the user does not exist, - this function returns an error, otherwise it returns true. - When delete_group_member/3 is called the Port and Dir options - are mandatory.

+

delete_group_member/3, delete_group_member/4 and + delete_group_member/5 deletes a user from a group. + If the group or the user does not exist, + this function returns an error, otherwise it returns true. + When delete_group_member/3 is called the Port and Dir options + are mandatory.

+ +
+ list_group_members(GroupName, Options) -> {ok, Users} | {error, Reason} list_group_members(GroupName, Port, Dir) -> {ok, Users} | {error, Reason} @@ -201,13 +228,17 @@ -

list_group_members/2, list_group_members/3 and list_group_members/4 - lists the members of a specified group. If the group does not - exist or there is an error, {error, Reason} is returned. - When list_group_members/2 is called the Port and Dir options - are mandatory.

+

list_group_members/2, list_group_members/3 and + list_group_members/4 + lists the members of a specified group. If the group does not + exist or there is an error, {error, Reason} is returned. + When list_group_members/2 is called the Port and Dir options + are mandatory.

+ +
+ list_groups(Options) -> {ok, Groups} | {error, Reason} list_groups(Port, Dir) -> {ok, Groups} | {error, Reason} @@ -225,12 +256,16 @@ -

list_groups/1, list_groups/2 and list_groups/3 lists all - the groups available. If there is an error, {error, Reason} - is returned. When list_groups/1 is called the Port and Dir options - are mandatory.

+

list_groups/1, list_groups/2 and list_groups/3 + lists all the groups available. + If there is an error, {error, Reason} is returned. + When list_groups/1 is called the Port and Dir options + are mandatory.

+ +
+ delete_group(GroupName, Options) -> true | {error,Reason} <name>delete_group(GroupName, Port, Dir) -> true | {error, Reason} delete_group(GroupName, Address, Port, Dir) -> true | {error, Reason} @@ -247,12 +282,16 @@ -

delete_group/2, delete_group/3 and delete_group/4 deletes the - group specified and returns true. If there is an error, - {error, Reason} is returned. When delete_group/2 is called the - Port and Dir options are mandatory.

+

delete_group/2, delete_group/3 and delete_group/4 + deletes the group specified and returns true. + If there is an error, {error, Reason} is returned. + When delete_group/2 is called the + Port and Dir options are mandatory.

+ +
+ update_password(Port, Dir, OldPassword, NewPassword, NewPassword) -> ok | {error, Reason} update_password(Address,Port, Dir, OldPassword, NewPassword, NewPassword) -> ok | {error, Reason} @@ -268,10 +307,12 @@ -

update_password/5 and update_password/6 Updates the AuthAccessPassword - for the specified directory. If NewPassword is equal to "NoPassword" no password is requires to - change authorisation data. If NewPassword is equal to "DummyPassword" no changes can be done - without changing the password first.

+

update_password/5 and update_password/6 + Updates the AuthAccessPassword for the specified directory. + If NewPassword is equal to "NoPassword" no password is requires to + change authorisation data. + If NewPassword is equal to "DummyPassword" no changes can be done + without changing the password first.

diff --git a/lib/inets/doc/src/notes_history.xml b/lib/inets/doc/src/notes_history.xml index 151bec375e..bd59c1ba47 100644 --- a/lib/inets/doc/src/notes_history.xml +++ b/lib/inets/doc/src/notes_history.xml @@ -1,10 +1,10 @@ - +
- 20042011 + 20042012 Ericsson AB. All Rights Reserved. diff --git a/lib/inets/doc/src/part.xml b/lib/inets/doc/src/part.xml index 36955df6b3..3b6734a9b8 100644 --- a/lib/inets/doc/src/part.xml +++ b/lib/inets/doc/src/part.xml @@ -1,10 +1,10 @@ - +
- 20042009 + 20042012 Ericsson AB. All Rights Reserved. diff --git a/lib/inets/doc/src/part_notes.xml b/lib/inets/doc/src/part_notes.xml index 21f464318b..81b0dedbfa 100644 --- a/lib/inets/doc/src/part_notes.xml +++ b/lib/inets/doc/src/part_notes.xml @@ -1,10 +1,10 @@ - +
- 20022009 + 20022012 Ericsson AB. All Rights Reserved. diff --git a/lib/inets/doc/src/part_notes_history.xml b/lib/inets/doc/src/part_notes_history.xml index 3c1e6f5232..f714a6d2e3 100644 --- a/lib/inets/doc/src/part_notes_history.xml +++ b/lib/inets/doc/src/part_notes_history.xml @@ -1,10 +1,10 @@ - +
- 20042009 + 20042012 Ericsson AB. All Rights Reserved. diff --git a/lib/inets/doc/src/tftp.xml b/lib/inets/doc/src/tftp.xml index 96d6ae0dd5..0b3e93a153 100644 --- a/lib/inets/doc/src/tftp.xml +++ b/lib/inets/doc/src/tftp.xml @@ -1,10 +1,10 @@ - +
- 20062009 + 20062012 Ericsson AB. All Rights Reserved. @@ -218,6 +218,8 @@ 5 times when the timeout expires.

+ + @@ -231,11 +233,14 @@

Starts a daemon process which listens for udp packets on a - port. When it receives a request for read or write it spawns - a temporary server process which handles the actual transfer - of the (virtual) file.

+ port. When it receives a request for read or write it spawns + a temporary server process which handles the actual transfer + of the (virtual) file.

+ +
+ read_file(RemoteFilename, LocalFilename, Options) -> {ok, LastCallbackState} | {error, Reason} Read a (virtual) file from a TFTP server @@ -248,23 +253,26 @@

Reads a (virtual) file RemoteFilename from a TFTP - server.

-

If LocalFilename is the atom binary, - tftp_binary is used as callback module. It concatenates - all transferred blocks and returns them as one single binary - in LastCallbackState.

-

If LocalFilename is a string and there are no - registered callback modules, tftp_file is used as - callback module. It writes each transferred block to the file - named LocalFilename and returns the number of - transferred bytes in LastCallbackState.

-

If LocalFilename is a string and there are registered - callback modules, LocalFilename is tested against - the regexps of these and the callback module corresponding to - the first match is used, or an error tuple is returned if no - matching regexp is found.

+ server.

+

If LocalFilename is the atom binary, + tftp_binary is used as callback module. It concatenates + all transferred blocks and returns them as one single binary + in LastCallbackState.

+

If LocalFilename is a string and there are no + registered callback modules, tftp_file is used as + callback module. It writes each transferred block to the file + named LocalFilename and returns the number of + transferred bytes in LastCallbackState.

+

If LocalFilename is a string and there are registered + callback modules, LocalFilename is tested against + the regexps of these and the callback module corresponding to + the first match is used, or an error tuple is returned if no + matching regexp is found.

+ +
+ write_file(RemoteFilename, LocalFilename, Options) -> {ok, LastCallbackState} | {error, Reason} Write a (virtual) file to a TFTP server @@ -288,10 +296,12 @@ block by block and returns the number of transferred bytes in LastCallbackState.

If LocalFilename is a string and there are registered - callback modules, LocalFilename is tested against - the regexps of these and the callback module corresponding to - the first match is used, or an error tuple is returned if no - matching regexp is found.

+ callback modules, LocalFilename is tested against + the regexps of these and the callback module corresponding to + the first match is used, or an error tuple is returned if no + matching regexp is found.

+ +
@@ -304,8 +314,9 @@ Reason = term() -

Returns info about all TFTP daemon processes. -

+

Returns info about all TFTP daemon processes.

+ +
@@ -318,8 +329,9 @@ Reason = term() -

Returns info about all TFTP server processes. -

+

Returns info about all TFTP server processes.

+ +
@@ -332,6 +344,8 @@

Returns info about a TFTP daemon, server or client process.

+ +
@@ -346,8 +360,9 @@ Reason = term() -

Changes config for all TFTP daemon processes -

+

Changes config for all TFTP daemon processes.

+ +
@@ -362,8 +377,9 @@ Reason = term() -

Changes config for all TFTP server processes -

+

Changes config for all TFTP server processes.

+ +
@@ -378,8 +394,11 @@

Changes config for a TFTP daemon, server or client process

+ +
+ start() -> ok | {error, Reason} Start the Inets application @@ -442,8 +461,9 @@ by the already ongoing connection on the server side. By not setting up yet another connection, in parallel with the ongoing one, the server will - consumer lesser resources. -

+ consumer lesser resources.

+ + @@ -468,17 +488,20 @@ Text = string() -

Prepares to open a file on the client side.

-

No new options may be added, but the ones that are present in - SuggestedOptions may be omitted or replaced with new - values in AcceptedOptions.

-

Will be followed by a call to open/4 before any - read/write access is performed. AcceptedOptions is - sent to the server which replies with those options that it - accepts. These will be forwarded to open/4 as - SuggestedOptions.

+

Prepares to open a file on the client side.

+

No new options may be added, but the ones that are present in + SuggestedOptions may be omitted or replaced with new + values in AcceptedOptions.

+

Will be followed by a call to open/4 before any + read/write access is performed. AcceptedOptions is + sent to the server which replies with those options that it + accepts. These will be forwarded to open/4 as + SuggestedOptions.

+ +
+ open(Peer, Access, Filename, Mode, SuggestedOptions, State) -> {ok, AcceptedOptions, NewState} | {error, {Code, Text}} Open a file for read or write access @@ -503,14 +526,17 @@

Opens a file for read or write access.

On the client side where the open/5 call has been - preceded by a call to prepare/5, all options must be - accepted or rejected.

-

On the server side, where there is no preceding - prepare/5 call, no new options may be added, but - the ones that are present in SuggestedOptions may be - omitted or replaced with new values in AcceptedOptions.

+ preceded by a call to prepare/5, all options must be + accepted or rejected.

+

On the server side, where there is no preceding + prepare/5 call, no new options may be added, but + the ones that are present in SuggestedOptions may be + omitted or replaced with new values in AcceptedOptions.

+ +
+ read(State) -> {more, Bin, NewState} | {last, Bin, FileSize} | {error, {Code, Text}} Read a chunk from the file @@ -526,15 +552,18 @@

Read a chunk from the file.

The callback function is expected to close - the file when the last file chunk is - encountered. When an error is encountered - the callback function is expected to clean - up after the aborted file transfer, such as - closing open file descriptors etc. In both - cases there will be no more calls to any of - the callback functions.

+ the file when the last file chunk is + encountered. When an error is encountered + the callback function is expected to clean + up after the aborted file transfer, such as + closing open file descriptors etc. In both + cases there will be no more calls to any of + the callback functions.

+ +
+ write(Bin, State) -> {more, NewState} | {last, FileSize} | {error, {Code, Text}} Write a chunk to the file @@ -550,15 +579,18 @@

Write a chunk to the file.

The callback function is expected to close - the file when the last file chunk is - encountered. When an error is encountered - the callback function is expected to clean - up after the aborted file transfer, such as - closing open file descriptors etc. In both - cases there will be no more calls to any of - the callback functions.

+ the file when the last file chunk is + encountered. When an error is encountered + the callback function is expected to clean + up after the aborted file transfer, such as + closing open file descriptors etc. In both + cases there will be no more calls to any of + the callback functions.

+ +
+ abort(Code, Text, State) -> ok Abort the file transfer @@ -572,14 +604,14 @@

Invoked when the file transfer is aborted.

The callback function is expected to clean - up its used resources after the aborted file - transfer, such as closing open file - descriptors etc. The function will not be - invoked if any of the other callback - functions returns an error, as it is - expected that they already have cleaned up - the necessary resources. It will however be - invoked if the functions fails (crashes).

+ up its used resources after the aborted file + transfer, such as closing open file + descriptors etc. The function will not be + invoked if any of the other callback + functions returns an error, as it is + expected that they already have cleaned up + the necessary resources. It will however be + invoked if the functions fails (crashes).

@@ -589,7 +621,9 @@ LOGGER FUNCTIONS

A tftp_logger callback module should be implemented as a - tftp_logger behavior and export the functions listed below.

+ tftp_logger behavior and export the functions listed below.

+ + @@ -602,7 +636,10 @@ Reason = term() -

Log an error message. See error_logger:error_msg/2 for details.

+

Log an error message. + See error_logger:error_msg/2 for details.

+ +
@@ -615,7 +652,10 @@ Reason = term() -

Log a warning message. See error_logger:warning_msg/2 for details.

+

Log a warning message. + See error_logger:warning_msg/2 for details.

+ +
@@ -628,7 +668,8 @@ Reason = term() -

Log an info message. See error_logger:info_msg/2 for details.

+

Log an info message. + See error_logger:info_msg/2 for details.

-- cgit v1.2.3