Skip to content

Commit

Permalink
feat: add src/netius/base/poll.pyi
Browse files Browse the repository at this point in the history
  • Loading branch information
hugo-gomes committed Dec 27, 2023
1 parent c529f5e commit 05b2a19
Showing 1 changed file with 86 additions and 0 deletions.
86 changes: 86 additions & 0 deletions src/netius/base/poll.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
from typing import Any

POLL_TIMEOUT: float

class Poll:
def __init__(self) -> None: ...
@classmethod
def name(cls) -> str: ...
@classmethod
def test(cls) -> bool: ...
def open(self, timeout: float = ...) -> None: ...
def close(self) -> None: ...
def poll(self) -> tuple[list, list, list]: ...
def poll_owner(self) -> dict: ...
def is_open(self) -> bool: ...
def is_edge(self) -> bool: ...
def is_empty(self) -> bool: ...
def sub_all(self, socket, owner: Any | None = ...) -> None: ...
def unsub_all(self, socket) -> None: ...
def is_sub_read(self, socket) -> bool: ...
def is_sub_write(self, socket) -> bool: ...
def is_sub_error(self, socket) -> bool: ...
def sub_read(self, socket, owner: Any | None = ...) -> None: ...
def sub_write(self, socket, owner: Any | None = ...) -> None: ...
def sub_error(self, socket, owner: Any | None = ...) -> None: ...
def unsub_read(self, socket) -> None: ...
def unsub_write(self, socket) -> None: ...
def unsub_error(self, socket) -> None: ...

class EpollPoll(Poll):
def __init__(self, *args, **kwargs) -> None: ...
@classmethod
def test(cls) -> bool: ...
def open(self, timeout: float = ...) -> None: ...
def close(self) -> None: ...
def poll(self) -> tuple[list, list, list]: ...
def is_edge(self) -> bool: ...
def sub_read(self, socket, owner: Any | None = ...) -> None: ...
def sub_write(self, socket, owner: Any | None = ...) -> None: ...
def sub_error(self, socket, owner: Any | None = ...) -> None: ...
def unsub_read(self, socket) -> None: ...
def unsub_write(self, socket) -> None: ...
def unsub_error(self, socket) -> None: ...

class KqueuePoll(Poll):
def __init__(self, *args, **kwargs) -> None: ...
@classmethod
def test(cls) -> bool: ...
def open(self, timeout: float = ...) -> None: ...
def close(self) -> None: ...
def poll(self) -> tuple[list, list, list]: ...
def is_edge(self) -> bool: ...
def sub_read(self, socket, owner: Any | None = ...) -> None: ...
def sub_write(self, socket, owner: Any | None = ...) -> None: ...
def sub_error(self, socket, owner: Any | None = ...) -> None: ...
def unsub_read(self, socket) -> None: ...
def unsub_write(self, socket) -> None: ...
def unsub_error(self, socket) -> None: ...

class PollPoll(Poll):
def __init__(self, *args, **kwargs) -> None: ...
@classmethod
def test(cls) -> bool: ...
def open(self, timeout: float = ...) -> None: ...
def close(self) -> None: ...
def poll(self) -> tuple[list, list, list]: ...
def is_edge(self) -> bool: ...
def sub_read(self, socket, owner: Any | None = ...) -> None: ...
def sub_write(self, socket, owner: Any | None = ...) -> None: ...
def sub_error(self, socket, owner: Any | None = ...) -> None: ...
def unsub_read(self, socket) -> None: ...
def unsub_write(self, socket) -> None: ...
def unsub_error(self, socket) -> None: ...

class SelectPoll(Poll):
def __init__(self, *args, **kwargs) -> None: ...
def open(self, timeout: float = ...) -> None: ...
def close(self) -> None: ...
def poll(self) -> tuple[list, list, list]: ...
def is_edge(self) -> bool: ...
def sub_read(self, socket, owner: Any | None = ...) -> None: ...
def sub_write(self, socket, owner: Any | None = ...) -> None: ...
def sub_error(self, socket, owner: Any | None = ...) -> None: ...
def unsub_read(self, socket) -> None: ...
def unsub_write(self, socket) -> None: ...
def unsub_error(self, socket) -> None: ...

0 comments on commit 05b2a19

Please sign in to comment.