import{_ass,casi,oasa,a9ast}from"./chunks/framework.C4_mTacX.js";constu=JSON.parse('{"title":"liteyuki.comm.rpc","description":"","frontmatter":{"title":"liteyuki.comm.rpc"},"headers":[],"relativePath":"dev/api/comm/rpc.md","filePath":"zh/dev/api/comm/rpc.md","lastUpdated":null}'),n={name:"dev/api/comm/rpc.md"},e=t('<h1id="liteyuki-comm-rpc"tabindex="-1">liteyuki.comm.rpc<aclass="header-anchor"href="#liteyuki-comm-rpc"aria-label="Permalink to "liteyuki.comm.rpc""></a></h1><p>本模块用于实现RPC(基于IPC)通信</p><h3id="class-rpc"tabindex="-1"><em><strong>class</strong></em><code>RPC</code><aclass="header-anchor"href="#class-rpc"aria-label="Permalinkto"***class***`RPC`""></a></h3><h4id="func-init-self-on-calling-on-calling-func-none"tabindex="-1"><em><strong>func</strong></em><code>__init__(self,on_calling:ON_CALLING_FUNC)->None</code><aclass="header-anchor"href="#func-init-self-on-calling-on-calling-func-none"aria-label="Permalinkto"***func***`__init__(self,on_calling:ON_CALLING_FUNC)->None`""></a></h4><details><summary><b>源代码</b>或<ahref="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/comm/rpc.py#L18"target="_blank">在GitHub上查看</a></summary><divclass="language-pythonvp-adaptive-theme"><buttontitle="CopyCode"class="copy"></button><spanclass="lang">python</span><preclass="shikishiki-themesgithub-lightgithub-darkvp-code"tabindex="0"><code><spanclass="line"><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">__init__</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self,on_calling:</span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">ON_CALLING_FUNC</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)-></span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">None</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>\n<spanclass="line"><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.on_calling</span><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">on_calling</span></span></code></pre></div></details><h4id="func-call-self-args-tuple-kwargs-dict-any"tabindex="-1"><em><strong>func</strong></em><code>call(self,args:tuple,kwargs:dict)->Any</code><aclass="header-anchor"href="#func-call-self-args-tuple-kwargs-dict-any"aria-label="Permalinkto"***func***`call(self,args:tuple,kwargs:dict)->Any`""></a></h4><p><strong>说明</strong>:调用</p><details><summary><b>源代码</b>或<ahref="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/comm/rpc.py#L21"target="_blank">在GitHub上查看</a></summary><divclass="language-pythonvp-adaptive-theme"><buttontitle="CopyCode"class="copy"></button><spanclass="lang">python</span><preclass="shikishiki-themesgithub-lightgithub-darkvp-code"tabindex="0"><code><spanclass="line"><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">call</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self,args:</span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">tuple</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,kwargs:</span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">dict</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)->Any:</span></span>\n<spanclass="line"><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"""</span></span>\n<spanclass="line"><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">调用</span></span>\n<spanclass="line"><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"""</span></span>\n<spanclass="line"><spanstyle="--shiki-light:#D73A49;--sh