Spec-Zone .ru
спецификации, руководства, описания, API
Spec-Zone .ru
спецификации, руководства, описания, API
Библиотека разработчика Mac Разработчик
Поиск

 

Эта страница руководства для  версии 10.9 Mac OS X

Если Вы выполняете различную версию  Mac OS X, просматриваете документацию локально:

Читать страницы руководства

Страницы руководства предназначаются как справочник для людей, уже понимающих технологию.

  • Чтобы изучить, как руководство организовано или узнать о синтаксисе команды, прочитайте страницу руководства для страниц справочника (5).

  • Для получения дополнительной информации об этой технологии, ищите другую документацию в Библиотеке Разработчика Apple.

  • Для получения общей информации о записи сценариев оболочки, считайте Shell, Пишущий сценарий Учебника для начинающих.



nameserv::server(n)                         Name service facility                        nameserv::server(n)



____________________________________________________________________________________________________________

NAME
       nameserv::server - Name service facility, Server

SYNOPSIS
       package require Tcl  8.4

       package require nameserv::server  ?0.3.2?

       package require comm

       package require interp

       package require logger

       ::nameserv::server::start

       ::nameserv::server::stop

       ::nameserv::server::active?

       ::nameserv::server::cget -option

       ::nameserv::server::configure

       ::nameserv::server::configure -option

       ::nameserv::server::configure -option value...

____________________________________________________________________________________________________________

DESCRIPTION
       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.

API
       The package exports five commands, as specified below:

       ::nameserv::server::start
              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.

       ::nameserv::server::stop
              Invoking  this  command stops the server and releases all information it had. Existing connec-tions connections
              tions are shut down, and no new connections will be accepted any longer.  The  result  of  the
              command is the empty string.

       ::nameserv::server::active?
              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.

       ::nameserv::server::cget -option
              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.

       ::nameserv::server::configure
              In this form the command returns a dictionary of all supported options, and their current val-ues. values.
              ues. The list of supported options and their meaning can be found in section OPTIONS.

       ::nameserv::server::configure -option
              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.

       ::nameserv::server::configure -option value...
              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.


OPTIONS
       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:

       -localonly bool
              This  option  specifies whether to accept only local connections (-localonly 1) or remote con-nections connections
              nections as well (-localonly 0). The default is to accept only local connections.

       -port number
              This option specifies the port the name service will listen on after it has been  started.  It
              has to be a positive integer number (> 0) not greater than 65536 (unsigned short). The initial
              default is the number returned by the command ::nameserv::server::common::port, as provided by
              the package ::nameserv::server::common.


HISTORY
       0.3    Extended the server with the ability to perform asynchronous and continuous searches.

       0.2    Changed name of -local switch to -localonly.

       0.1    Initial implementation of the server.


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   SF   Trackers   [http://source -
       forge.net/tracker/? group_id=12883].   Please  also report any ideas for enhancements you may have for
       either package and/or documentation.

SEE ALSO
       nameserv::client(n), nameserv::common(n)

KEYWORDS
       name service, server

CATEGORY
       Networking

COPYRIGHT
       Copyright (c) 2007-2008 Andreas Kupries <andreas_kupries@users.sourceforge.net>




nns                                                 0.3.2                                nameserv::server(n)

Сообщение о проблемах

Способ сообщить о проблеме с этой страницей руководства зависит от типа проблемы:

Ошибки содержания
Ошибки отчета в содержании этой документации со ссылками на отзыв ниже.
Отчеты об ошибках
Сообщите об ошибках в функциональности описанного инструмента или API через Генератор отчетов Ошибки.
Форматирование проблем
Отчет, форматирующий ошибки в интерактивной версии этих страниц со ссылками на отзыв ниже.