1nameserv::server(n)          Name service facility         nameserv::server(n)
2
3
4
5______________________________________________________________________________
6

NAME

8       nameserv::server - Name service facility, Server
9

SYNOPSIS

11       package require Tcl  8.4
12
13       package require nameserv::server  ?0.3.2?
14
15       package require comm
16
17       package require interp
18
19       package require logger
20
21       ::nameserv::server::start
22
23       ::nameserv::server::stop
24
25       ::nameserv::server::active?
26
27       ::nameserv::server::cget -option
28
29       ::nameserv::server::configure
30
31       ::nameserv::server::configure -option
32
33       ::nameserv::server::configure -option value...
34
35______________________________________________________________________________
36

DESCRIPTION

38       Please read Name service facility, introduction first.
39
40       This  package  provides  an  implementation of the serviver side of the
41       name service facility queried by the client  provided  by  the  package
42       nameserv.  All  information required by the server will be held in mem‐
43       ory. There is no persistent state.
44
45       This service is built in top of and for the package comm.  It has noth‐
46       ing  to  do  with  the  Internet's Domain Name System. If the reader is
47       looking for a package dealing with that please  see  Tcllib's  packages
48       dns and resolv.
49
50       This  server  supports the Core protocol feature, and since version 0.3
51       the Search/Continuous feature as well.
52

API

54       The package exports five commands, as specified below:
55
56       ::nameserv::server::start
57              This command starts the server and causes it to  listen  on  the
58              configured  port.  From  now  on clients are able to connect and
59              make requests. The result of the command is the empty string.
60
61              Note that any incoming requests will  only  be  handled  if  the
62              application the server is part of does enter an event loop after
63              this command has been run.
64
65       ::nameserv::server::stop
66              Invoking this command stops the server and releases all informa‐
67              tion it had. Existing connections are shut down, and no new con‐
68              nections will be accepted any longer. The result of the  command
69              is the empty string.
70
71       ::nameserv::server::active?
72              This command returns a boolean value indicating the state of the
73              server. The result will be true if the server  is  active,  i.e.
74              has been started, and false otherwise.
75
76       ::nameserv::server::cget -option
77              This  command  returns  the  currently  configured value for the
78              specified -option. The list of supported options and their mean‐
79              ing can be found in section OPTIONS.
80
81       ::nameserv::server::configure
82              In  this  form the command returns a dictionary of all supported
83              options, and their current values. The list of supported options
84              and their meaning can be found in section OPTIONS.
85
86       ::nameserv::server::configure -option
87              In   this   form   the   command   is   an  alias  for  "::name‐
88              serv::server::cget -option]".  The list of supported options and
89              their meaning can be found in section OPTIONS.
90
91       ::nameserv::server::configure -option value...
92              In this form the command is used to configure one or more of the
93              supported options. At least one option has to be specified,  and
94              each option is followed by its new value.  The list of supported
95              options and their meaning can be found in section OPTIONS.
96
97              This form can be used only if the server is not active, i.e. has
98              not  been  started yet, or has been stopped. While the server is
99              active it cannot be reconfigured.
100

OPTIONS

102       The options supported by the server are for the  specification  of  the
103       TCP  port  to listen on, and whether to accept non-local connections or
104       not.  They are:
105
106       -localonly bool
107              This option specifies whether to accept only  local  connections
108              (-localonly 1) or remote connections as well (-localonly 0). The
109              default is to accept only local connections.
110
111       -port number
112              This option specifies the port the name service will  listen  on
113              after  it has been started. It has to be a positive integer num‐
114              ber (> 0) not greater than 65536 (unsigned short).  The  initial
115              default   is   the   number  returned  by  the  command  ::name‐
116              serv::server::common::port, as provided by the  package  ::name‐
117              serv::server::common.
118

HISTORY

120       0.3    Extended the server with the ability to perform asynchronous and
121              continuous searches.
122
123       0.2    Changed name of -local switch to -localonly.
124
125       0.1    Initial implementation of the server.
126

BUGS, IDEAS, FEEDBACK

128       This document, and the package it describes, will  undoubtedly  contain
129       bugs  and  other problems.  Please report such in the category nameserv
130       of the Tcllib Trackers [http://core.tcl.tk/tcllib/reportlist].   Please
131       also  report any ideas for enhancements you may have for either package
132       and/or documentation.
133
134       When proposing code changes, please provide unified diffs, i.e the out‐
135       put of diff -u.
136
137       Note  further  that  attachments  are  strongly  preferred over inlined
138       patches. Attachments can be made by going  to  the  Edit  form  of  the
139       ticket  immediately  after  its  creation, and then using the left-most
140       button in the secondary navigation bar.
141

SEE ALSO

143       nameserv::client(n), nameserv::common(n)
144

KEYWORDS

146       name service, server
147

CATEGORY

149       Networking
150
152       Copyright (c) 2007-2008 Andreas Kupries <andreas_kupries@users.sourceforge.net>
153
154
155
156
157tcllib                               0.3.2                 nameserv::server(n)
Impressum