Skip to main content

liteyuki.comm.socks_channel

SnowyKamiLess than 1 minute

class SocksChannel

method __init__(self, name: str)

Description: 初始化通道

Arguments:

  • name: 通道ID
Source code
def __init__(self, name: str):
    """
        初始化通道
        Args:
            name: 通道ID
        """
    self._name = name
    self._conn_send = None
    self._conn_recv = None
    self._closed = False

method send(self, data)

Description: 发送数据

Arguments:

  • data: 数据
Source code
def send(self, data):
    """
        发送数据
        Args:
            data: 数据
        """
    pass

method receive(self)

Description: 接收数据

Return: data: 数据

Source code
def receive(self):
    """
        接收数据
        Returns:
            data: 数据
        """
    pass

method close(self)

Description: 关闭通道

Source code
def close(self):
    """
        关闭通道
        """
    pass