[mnet-devel] new-style handler funcs in v0.7
Zooko O'Whielacronx
zooko at zooko.com
Fri Oct 17 00:01:55 BST 2003
In the old style, handler funcs took args like this, and they returned a
response that would get sent back, like this:
def handler_func(widget, msgbody):
...
return answer
In the new style, handler funcs take args like this, and send results like this:
def handler_func(peer, msg, ophandler):
...
ophandler.result(answer)
I've temporarily changed the name of the handler-registration function from
"set_handler_func()" to "set_handler_func_newstyle()" in order to get an
earlier failure if your handler func is of the old style.
If cvs.sf.net's viewcvs account were up to date then this URL would show you
an example where I changed the handlers in blockserver, but alas it will be an
unknown number of days before this URL works:
http://cvs.sourceforge.net/viewcvs.py/mnet/mnet_new/mnetlib/filesystem/blockserver.py?r1=1.3&r2=1.4
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
mnet-devel mailing list
mnet-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mnet-devel
More information about the Mnet-devel
mailing list