forked from bot/app
31 lines
7.6 KiB
JavaScript
31 lines
7.6 KiB
JavaScript
import{_ as e,o as n,c as s,e as a}from"./app-BrSLFMno.js";const t={},o=a(`<h3 id="class-sockschannel" tabindex="-1"><a class="header-anchor" href="#class-sockschannel"><span><strong>class</strong> <code>SocksChannel</code></span></a></h3><h3 id="method-init-self-name-str" tabindex="-1"><a class="header-anchor" href="#method-init-self-name-str"><span><em>method</em> <code>__init__(self, name: str)</code></span></a></h3><p><strong>Description</strong>: 初始化通道</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>name: 通道ID</li></ul></blockquote><details><summary><b>Source code</b></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">"""
|
|
初始化通道
|
|
Args:
|
|
name: 通道ID
|
|
"""</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><h3 id="method-send-self-data" tabindex="-1"><a class="header-anchor" href="#method-send-self-data"><span><em>method</em> <code>send(self, data)</code></span></a></h3><p><strong>Description</strong>: 发送数据</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>data: 数据</li></ul></blockquote><details><summary><b>Source code</b></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">"""
|
|
发送数据
|
|
Args:
|
|
data: 数据
|
|
"""</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><h3 id="method-receive-self" tabindex="-1"><a class="header-anchor" href="#method-receive-self"><span><em>method</em> <code>receive(self)</code></span></a></h3><p><strong>Description</strong>: 接收数据</p><p><strong>Return</strong>: data: 数据</p><details><summary><b>Source code</b></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">"""
|
|
接收数据
|
|
Returns:
|
|
data: 数据
|
|
"""</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><h3 id="method-close-self" tabindex="-1"><a class="header-anchor" href="#method-close-self"><span><em>method</em> <code>close(self)</code></span></a></h3><p><strong>Description</strong>: 关闭通道</p><details><summary><b>Source code</b></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">"""
|
|
关闭通道
|
|
"""</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>`,18),l=[o];function i(c,d){return n(),s("div",null,l)}const p=e(t,[["render",i],["__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","description":"class SocksChannel method __init__(self, name: str) Description: 初始化通道 Arguments: name: 通道ID Source code method send(self, data) Description: 发送数据 Arguments: data: 数据 Source cod...","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":"class SocksChannel method __init__(self, name: str) Description: 初始化通道 Arguments: name: 通道ID Source code method send(self, data) Description: 发送数据 Arguments: data: 数据 Source cod..."}],["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":[]},{"level":3,"title":"method __init__(self, name: str)","slug":"method-init-self-name-str","link":"#method-init-self-name-str","children":[]},{"level":3,"title":"method send(self, data)","slug":"method-send-self-data","link":"#method-send-self-data","children":[]},{"level":3,"title":"method receive(self)","slug":"method-receive-self","link":"#method-receive-self","children":[]},{"level":3,"title":"method close(self)","slug":"method-close-self","link":"#method-close-self","children":[]}],"git":{"createdTime":null,"updatedTime":null,"contributors":[]},"readingTime":{"minutes":0.48,"words":145},"filePathRelative":"en/dev/api/comm/socks_channel.md","autoDesc":true}');export{p as comp,u as data};
|