methods package¶
Subpackages¶
Submodules¶
Module contents¶
自定义RPC模块
开发者可在该名称空间下放置所需的远程方法
本模块下的几个函数是简单的远程方法示例
-
methods.
add
(a, b)¶ 加法
-
methods.
echo
(txt)¶ 原样返回收到的内容
参数: txt (str) – 字符串 返回: 原样返回 txt
字符串返回类型: str
-
methods.
exception
(*args)¶ 抛出异常
-
methods.
plus
(*args)¶ 求和
-
methods.
sleep
(seconds)¶ 睡眠
参数: seconds (float) – 睡眠时间,时间为秒
-
methods.
warnlog
(msg)¶ 在 Logging 中输出警告信息
参数: msg (str) – 警告信息