Skip to content

TCP

dotflow.abc.tcp.TCPClient

Bases: ABC

Source code in dotflow/abc/tcp.py
 7
 8
 9
10
11
12
13
14
class TCPClient(ABC):
    def __init__(self, url: str):
        self.url = url
        self.context = None

    @abstractmethod
    def sender(self, content: dict) -> None:
        pass

context = None instance-attribute

url = url instance-attribute

__init__(url)

Source code in dotflow/abc/tcp.py
 8
 9
10
def __init__(self, url: str):
    self.url = url
    self.context = None

sender(content) abstractmethod

Source code in dotflow/abc/tcp.py
12
13
14
@abstractmethod
def sender(self, content: dict) -> None:
    pass

dotflow.abc.tcp.TCPServer

Bases: ABC

Source code in dotflow/abc/tcp.py
17
18
19
20
21
22
23
24
25
26
27
28
29
class TCPServer(ABC):
    def __init__(self, url: str, handler: Callable):
        self.url = url
        self.handler = handler
        self.context = None

    @abstractmethod
    async def receiver(self) -> None:
        pass

    @abstractmethod
    async def run(self) -> None:
        pass

context = None instance-attribute

handler = handler instance-attribute

url = url instance-attribute

__init__(url, handler)

Source code in dotflow/abc/tcp.py
18
19
20
21
def __init__(self, url: str, handler: Callable):
    self.url = url
    self.handler = handler
    self.context = None

receiver() abstractmethod async

Source code in dotflow/abc/tcp.py
23
24
25
@abstractmethod
async def receiver(self) -> None:
    pass

run() abstractmethod async

Source code in dotflow/abc/tcp.py
27
28
29
@abstractmethod
async def run(self) -> None:
    pass