import{_ as s,c as a,o as i,a9 as n}from"./chunks/framework.C4_mTacX.js";const g=JSON.parse('{"title":"liteyuki.comm.socks_channel","description":"","frontmatter":{"title":"liteyuki.comm.socks_channel"},"headers":[],"relativePath":"dev/api/comm/socks_channel.md","filePath":"zh/dev/api/comm/socks_channel.md","lastUpdated":null}'),e={name:"dev/api/comm/socks_channel.md"},t=n(`
基于socket的通道
SocksChannel
__init__(self, name: str)
说明: 初始化通道
参数:
- name: 通道ID
def __init__(self, name: str):
"""
初始化通道
Args:
name: 通道ID
"""
self._name = name
self._conn_send = None
self._conn_recv = None
self._closed = False
send(self, data)
说明: 发送数据
参数:
- data: 数据
def send(self, data):
"""
发送数据
Args:
data: 数据
"""
pass
receive(self)
说明: 接收数据
返回: data: 数据
def receive(self):
"""
接收数据
Returns:
data: 数据
"""
pass
close(self)
说明: 关闭通道
def close(self):
"""
关闭通道
"""
pass