Newer
Older
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
from asyncio import StreamReader
from enum import Enum
from typing import IO
from typing import ClassVar
from typing import NamedTuple
__all__ = ["LittleEndianSignedInt32", "Type", "Packet", "random_request_id"]
class LittleEndianSignedInt32(int):
MIN: ClassVar[int]
MAX: ClassVar[int]
@classmethod
async def aread(cls, reader: StreamReader) -> LittleEndianSignedInt32: ...
@classmethod
def read(cls, file: IO[bytes]) -> LittleEndianSignedInt32: ...
def __bytes__(self) -> bytes: ...
class Type(LittleEndianSignedInt32, Enum):
SERVERDATA_AUTH = ...
SERVERDATA_AUTH_RESPONSE = ...
SERVERDATA_EXECCOMMAND = ...
SERVERDATA_RESPONSE_VALUE = ...
@classmethod
async def aread(cls, reader: StreamReader, *, prefix: str = ...) -> Type: ...
@classmethod
def read(cls, file: IO[bytes], *, prefix: str = ...) -> Type: ...
class Packet(NamedTuple):
id: LittleEndianSignedInt32
type: Type
payload: bytes
terminator: ClassVar[bytes]
@classmethod
def make_command(cls, *_: str, encoding: str = ...) -> Packet: ...
@classmethod
def make_login(cls, passwd: str, *, encoding: str = ...) -> Packet: ...
@classmethod
async def aread(cls, reader: StreamReader) -> LittleEndianSignedInt32: ...
@classmethod
def read(cls, file: IO[bytes]) -> LittleEndianSignedInt32: ...
def __bytes__(self) -> bytes: ...
def __radd__(self, other: Packet|None) -> Packet: ...
def random_request_id() -> LittleEndianSignedInt32: ...