On Thursday 26 February 2004 06:50 am, Nikolay Kim wrote:
> is there any way create server for new protocol without changing ZServer
There's clearly a need for some more documentation here, but I'm not sure what
to write yet, or where it should go.
Contrary to many of the other responses, yes, this shouldn't be difficult at
all. You'll need a couple of pieces of Python code:
1. Your server implementation. It sounds like you have this already.
2. A factory object that can accept configuration data and create an instance
of your server object.
You then need to create a ZConfig component that provides a section type to
support your server. The ZConfig documentation discusses this somewhat. The
new section type will need to declare that it implements the ZServer.server
abstract type; it should probably look something like this:
<!-- configuration data should be described here -->
You'll need to arrange for the package containing this component is available
on the Python sys.path before zope.conf is loaded; this is mostly easily done
by manipulating the PYTHONPATH environment variable.
Your zope.conf file can now include the following to load and use your new
# configuration settings go here
Feel free to ask questions about this; I'm usually more available to respond
than I have been a couple of days.
Fred L. Drake, Jr. <fred at zope.com>
PythonLabs at Zope Corporation
Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists -