1
0
forked from bot/app
LiteyukiBot/assets/socks_channel.html-M9CaY0_8.js

31 lines
8.1 KiB
JavaScript
Raw Normal View History

import{_ as e,o as n,c as s,e as a}from"./app-BvUYPzLF.js";const t={},o=a(`<h1 id="liteyuki-comm-socks-channel" tabindex="-1"><a class="header-anchor" href="#liteyuki-comm-socks-channel"><span>liteyuki.comm.socks_channel</span></a></h1><p><strong>Description</strong>: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved</p><p>@Time : 2024/8/25 下午3:54 @Author : snowykami @Email : snowykami@outlook.com @File : channelv2.py @Software: PyCharm</p><h3 id="class-sockschannel" tabindex="-1"><a class="header-anchor" href="#class-sockschannel"><span><em><strong>class</strong></em> <code>SocksChannel</code></span></a></h3><h4 id="def-init-self-name-str" tabindex="-1"><a class="header-anchor" href="#def-init-self-name-str"><span><em><strong>def</strong></em> <code>__init__(self, name: str)</code></span></a></h4><p><strong>Description</strong>: 初始化通道</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>name: 通道ID</li></ul></blockquote><details><summary><b>Source code</b> or <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/comm/socks_channel.py#L19" target="_blank">View on GitHub</a></summary><div class="language-python line-numbers-mode" data-ext="py" data-title="py"><pre class="language-python"><code><span class="token keyword">def</span> <span class="token function">__init__</span><span class="token punctuation">(</span>self<span class="token punctuation">,</span> name<span class="token punctuation">:</span> <span class="token builtin">str</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
<span class="token triple-quoted-string string">&quot;&quot;&quot;
初始化通道
Args:
name: 通道ID
&quot;&quot;&quot;</span>
self<span class="token punctuation">.</span>_name <span class="token operator">=</span> name
self<span class="token punctuation">.</span>_conn_send <span class="token operator">=</span> <span class="token boolean">None</span>
self<span class="token punctuation">.</span>_conn_recv <span class="token operator">=</span> <span class="token boolean">None</span>
self<span class="token punctuation">.</span>_closed <span class="token operator">=</span> <span class="token boolean">False</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details><h4 id="def-send-self-data" tabindex="-1"><a class="header-anchor" href="#def-send-self-data"><span><em><strong>def</strong></em> <code>send(self, data)</code></span></a></h4><p><strong>Description</strong>: </p><p><strong>Arguments</strong>:</p><blockquote><ul><li>data: </li></ul></blockquote><details><summary><b>Source code</b> or <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/comm/socks_channel.py#L31" target="_blank">View on GitHub</a></summary><div class="language-python line-numbers-mode" data-ext="py" data-title="py"><pre class="language-python"><code><span class="token keyword">def</span> <span class="token function">send</span><span class="token punctuation">(</span>self<span class="token punctuation">,</span> data<span class="token punctuation">)</span><span class="token punctuation">:</span>
<span class="token triple-quoted-string string">&quot;&quot;&quot;
发送数据
Args:
data: 数据
&quot;&quot;&quot;</span>
<span class="token keyword">pass</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details><h4 id="def-receive-self" tabindex="-1"><a class="header-anchor" href="#def-receive-self"><span><em><strong>def</strong></em> <code>receive(self)</code></span></a></h4><p><strong>Description</strong>: </p><p><strong>Return</strong>: data: </p><details><summary><b>Source code</b> or <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/comm/socks_channel.py#L40" target="_blank">View on GitHub</a></summary><div class="language-python line-numbers-mode" data-ext="py" data-title="py"><pre class="language-python"><code><span class="token keyword">def</span> <span class="token function">receive</span><span class="token punctuation">(</span>self<span class="token punctuation">)</span><span class="token punctuation">:</span>
<span class="token triple-quoted-string string">&quot;&quot;&quot;
接收数据
Returns:
data: 数据
&quot;&quot;&quot;</span>
<span class="token keyword">pass</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details><h4 id="def-close-self" tabindex="-1"><a class="header-anchor" href="#def-close-self"><span><em><strong>def</strong></em> <code>close(self)</code></span></a></h4><p><strong>Description</strong>: </p><details><summary><b>Source code</b> or <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/comm/socks_channel.py#L49" target="_blank">View on GitHub</a></summary><div class="language-python line-numbers-mode" data-ext="py" data-title="py"><pre class="language-python"><code><span class="token keyword">def</span> <span class="token function">close</span><span class="token punctuation">(</span>self<span class="token punctuation">)</span><span class="token punctuation">:</span>
<span class="token triple-quoted-string string">&quot;&quot;&quot;
关闭通道
&quot;&quot;&quot;</span>
<span class="token keyword">pass</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details>`,21),i=[o];function l(c,r){return n(),s("div",null,i)}const d=e(t,[["render",l],["__file","socks_channel.html.vue"]]),u=JSON.parse('{"path":"/en/dev/api/comm/socks_channel.html","title":"liteyuki.comm.socks_channel","lang":"en-US","frontmatter":{"title":"liteyuki.comm.socks_channel","lastUpdated":false,"description":"liteyuki.comm.socks_channel Description: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved @Time : 2024/8/25 3:54 @Author : snowykami @Email : snowykami@outlook.com ...","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/api/comm/socks_channel.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/api/comm/socks_channel.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"liteyuki.comm.socks_channel"}],["meta",{"property":"og:description","content":"liteyuki.comm.socks_channel Description: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved @Time : 2024/8/25 3:54 @Author : snowykami @Email : snowykami@outlook.com ..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.comm.socks_channel\\",\\"image\\":[\\"\\"],\\"dateModified\\":null,\\"author\\":[]}"]]},"headers":[{"level":3,"title":"class SocksChannel","slug":"class-sockschannel","link":"#class-sockschannel","children":[]}],"git":{"createdTime":null,"updatedTime":null,"contributors":[]},"readingTime":{"minutes":0.73,"words":219},"filePathRelative":"en/dev/api/comm/socks_channel.md","autoDesc":true}');export{d as comp,u as data};