Changeset 750
- Timestamp:
- 10/22/05 13:57:48
- Files:
-
- trunk/cherrypy/lib/filter/xmlrpcfilter.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/lib/filter/xmlrpcfilter.py
r730 r750 82 82 ## 83 83 ## EXAMPLE CODE FOR THE SERVER: 84 ## from cherrypy.lib.filter.xmlrpcfilter import XmlRpcFilter 85 ## from cherrypy import cherrypy 84 ## import cherrypy 86 85 ## 87 86 ## class Root: 88 ## _cpFilterList = [XmlRpcFilter()] 89 ## 90 ## def longString(self,s,times): 91 ## return s*times 87 ## def longString(self, s, times): 88 ## return s * times 92 89 ## longString.exposed = True 93 90 ## 94 91 ## cherrypy.root = Root() 92 ## cherrypy.config.update({'xmlRpcFilter.on': True, 93 ## 'socketPort': 9001, 94 ## 'threadPool':0, 95 ## 'socketQueueSize':10 }) 95 96 ## if __name__=='__main__': 96 ## cherrypy.server.start(configMap = {'socketPort': 9001, 97 ## 'threadPool':0, 98 ## 'socketQueueSize':10 }) 97 ## cherrypy.server.start() 98 ## 99 99 ## EXAMPLE CODE FOR THE CLIENT: 100 100 ## >>> import xmlrpclib 101 101 ## >>> server = xmlrpclib.ServerProxy('http://localhost:9001') 102 ## >>> assert server.longString('abc', 3) == 'abcabcabc'102 ## >>> assert server.longString('abc', 3) == 'abcabcabc' 103 103 ## >>> 104 104 ######################################################################

