Tcl Library Source Code

Documentation
Login


[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]

NAME

nameserv - Name service facility, Client

Table Of Contents

SYNOPSIS

package require Tcl 8.5 9
package require nameserv ?0.4.3?
package require comm
package require logger

::nameserv::bind name data
::nameserv::release
::nameserv::search ?-async|-continuous? ?pattern?
::nameserv::protocol
::nameserv::server_protocol
::nameserv::server_features
::nameserv::cget -option
::nameserv::configure
::nameserv::configure -option
::nameserv::configure -option value...
$result destroy
$result filled
$result get name
$result names
$result size
$result getall ?pattern?

DESCRIPTION

Please read Name service facility, introduction first.

This package provides a client for the name service facility implemented by the package nameserv::server.

This service is built in top of and for the package comm. It has nothing to do with the Internet's Domain Name System. If the reader is looking for a package dealing with that please see Tcllib's packages dns and resolv.

API

The package exports eight commands, as specified below:

CONNECTION HANDLING

The client automatically connects to the service when one of the commands below is run for the first time, or whenever one of the commands is run after the connection was lost, when it was lost.

Since version 0.2 of the client it will generate an event when the connection is lost, allowing higher layers to perform additional actions. This is done via the support package uevent. This and all other name service related packages hereby reserve the uevent-tag nameserv. All their events will be posted to that tag.

EVENTS

This package generates only one event, lost-connection. The detail information provided to that event is a Tcl dictionary. The only key contained in the dictionnary is reason, and its value will be a string describing why the connection was lost. This string is supplied by the underlying communication package, i.e. comm.

OPTIONS

The options supported by the client are for the specification of which name service to contact, i.e. of the location of the name service. They are:

ASYNCHRONOUS AND CONTINUOUS SEARCHES

Asynchronous and continuous searches are invoked by using either option -async or -continuous as argument to the command ::nameserv::search.

Note that these two options are supported if and only if the service the client is connected to supports the protocol feature Search/Continuous. The service provided by the package ::nameserv::server does this since version 0.3.

For such searches the result of the search command is the Tcl command of an object holding the actual result. The API provided by these objects is:

HISTORY

Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category nameserv of the Tcllib Trackers. Please also report any ideas for enhancements you may have for either package and/or documentation.

When proposing code changes, please provide unified diffs, i.e the output of diff -u.

Note further that attachments are strongly preferred over inlined patches. Attachments can be made by going to the Edit form of the ticket immediately after its creation, and then using the left-most button in the secondary navigation bar.

SEE ALSO

nameserv::common(n), nameserv::server(n)

KEYWORDS

client, name service

CATEGORY

Networking

COPYRIGHT

Copyright © 2007-2008 Andreas Kupries