TCP

dotflow.abc.tcp.TCPClient

Bases: ABC

Source code in dotflow/abc/tcp.py
 7
 8
 9
10
11
12
13
14
15
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
 9
10
11
def __init__(self, url: str):
    self.url = url
    self.context = None

sender(content) abstractmethod

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

dotflow.abc.tcp.TCPServer

Bases: ABC

Source code in dotflow/abc/tcp.py
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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
20
21
22
23
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
25
26
27
@abstractmethod
async def receiver(self) -> None:
    pass

run() abstractmethod async

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