nameserv::auto - Name service facility, Client Extension
TABLE OF CONTENTS
SYNOPSIS
DESCRIPTION
API
OPTIONS
BUGS, IDEAS, FEEDBACK
SEE ALSO
KEYWORDS
COPYRIGHT
package require Tcl 8.4
package require nameserv::auto ?0.1?
package require nameserv
|
This package sits on top of the regular name service client (nameserv) and provides automatic restoration of a lost connection, and automatic rebinding of name/data pairs. The latter is however restricted to names which registered through this package instead of the regular client.
It does this by watching for the lost-connection events generated by nameserv and then trying to reconnect every N milliseconds (configurable, default is 1000, i.e. 1 second).
An important case to detect and handle is where a registered name was bound by a different client in the interval between loss and restoration of the connection. When that happens an automatic rebinding is not possible anymore for the specific name/data pair. This package will generate a lost-name event (tag nameserv) for all such names. The detail information of these events will be a Tcl dictionary containing two keys, name, and data, whose values hold the information of the lost pair.
The package exports three commands, as specified below:
The one option supported by the auto-client specifies the time interval between attempts to restore a lost connection. It is:
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category nameserv of the Tcllib SF Trackers. Please also report any ideas for enhancements you may have for either package and/or documentation.
nameserv(3tcl)
automatic, client, name service, reconnect, restore
Copyright © 2007 Andreas Kupries <andreas_kupries@users.sourceforge.net>