File: _abc.py

package info (click to toggle)
python-socks 2.7.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 544 kB
  • sloc: python: 5,195; sh: 8; makefile: 3
file content (40 lines) | stat: -rw-r--r-- 909 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
from typing import Optional


class SyncResolver:
    def resolve(self, host, port=0, family=0):
        raise NotImplementedError()


class AsyncResolver:
    async def resolve(self, host, port=0, family=0):
        raise NotImplementedError()


class SyncSocketStream:

    def write_all(self, data: bytes):
        raise NotImplementedError()

    def read(self, max_bytes: Optional[int] = None):
        raise NotImplementedError()

    def read_exact(self, n: int):
        raise NotImplementedError()

    def close(self):
        raise NotImplementedError()


class AsyncSocketStream:
    async def write_all(self, data: bytes):
        raise NotImplementedError()

    async def read(self, max_bytes: Optional[int] = None):
        raise NotImplementedError()

    async def read_exact(self, n: int):
        raise NotImplementedError()

    async def close(self):
        raise NotImplementedError()