nameserv::server - Name service facility, Server
Please read Name service facility, introduction first.
This package provides an implementation of the serviver side of the name service facility queried by the client provided by the package nameserv. All information required by the server will be held in memory. There is no persistent state.
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.
This server supports the Core protocol feature, and since version 0.3 the Search/Continuous feature as well.
The package exports five commands, as specified below:
This command starts the server and causes it to listen on the configured port. From now on clients are able to connect and make requests. The result of the command is the empty string.
Note that any incoming requests will only be handled if the application the server is part of does enter an event loop after this command has been run.
Invoking this command stops the server and releases all information it had. Existing connections are shut down, and no new connections will be accepted any longer. The result of the command is the empty string.
This command returns a boolean value indicating the state of the server. The result will be true if the server is active, i.e. has been started, and false otherwise.
This command returns the currently configured value for the specified -option. The list of supported options and their meaning can be found in section OPTIONS.
In this form the command returns a dictionary of all supported options, and their current values. The list of supported options and their meaning can be found in section OPTIONS.
In this form the command is an alias for "::nameserv::server::cget -option". The list of supported options and their meaning can be found in section OPTIONS.
In this form the command is used to configure one or more of the supported options. At least one option has to be specified, and each option is followed by its new value. The list of supported options and their meaning can be found in section OPTIONS.
This form can be used only if the server is not active, i.e. has not been started yet, or has been stopped. While the server is active it cannot be reconfigured.
The options supported by the server are for the specification of the TCP port to listen on, and whether to accept non-local connections or not. They are:
Extended the server with the ability to perform asynchronous and continuous searches.
Changed name of -local switch to -localonly.
Initial implementation of the server.
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.
nameserv::client(n), nameserv::common(n)
Networking
Copyright © 2007-2008 Andreas Kupries <[email protected]>