/usr/share/doc/pyro/examples/maxclients/server.py is in pyro-examples 1:3.14-1.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | #!/usr/bin/env python
import sys, os
sys.path.insert(0,os.pardir) # to find testserver.py
import testserver
import Pyro.core
######## testclass object
class testclass(object):
def setname(self,name):
self.name=name
def getname(self):
return self.name
######## main program
Pyro.core.initServer()
Pyro.config.PYRO_TRACELEVEL=3
Pyro.config.PYRO_LOGFILE='server_log'
Pyro.config.PYRO_MAXCONNECTIONS = 10
print 'Reduced max number of simultaneous connections to 10'
print 'Check the logfile for messages: server_log'
testserver.start(testclass, 'maxclients', delegate=1)
|