mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
Re-organize directory structure (#4971)
See discussion in #2491 Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
This commit is contained in:
27
stdlib/asyncio/protocols.pyi
Normal file
27
stdlib/asyncio/protocols.pyi
Normal file
@@ -0,0 +1,27 @@
|
||||
import sys
|
||||
from asyncio import transports
|
||||
from typing import Optional, Tuple
|
||||
|
||||
class BaseProtocol:
|
||||
def connection_made(self, transport: transports.BaseTransport) -> None: ...
|
||||
def connection_lost(self, exc: Optional[Exception]) -> None: ...
|
||||
def pause_writing(self) -> None: ...
|
||||
def resume_writing(self) -> None: ...
|
||||
|
||||
class Protocol(BaseProtocol):
|
||||
def data_received(self, data: bytes) -> None: ...
|
||||
def eof_received(self) -> Optional[bool]: ...
|
||||
|
||||
if sys.version_info >= (3, 7):
|
||||
class BufferedProtocol(BaseProtocol):
|
||||
def get_buffer(self, sizehint: int) -> bytearray: ...
|
||||
def buffer_updated(self, nbytes: int) -> None: ...
|
||||
|
||||
class DatagramProtocol(BaseProtocol):
|
||||
def datagram_received(self, data: bytes, addr: Tuple[str, int]) -> None: ...
|
||||
def error_received(self, exc: Exception) -> None: ...
|
||||
|
||||
class SubprocessProtocol(BaseProtocol):
|
||||
def pipe_data_received(self, fd: int, data: bytes) -> None: ...
|
||||
def pipe_connection_lost(self, fd: int, exc: Optional[Exception]) -> None: ...
|
||||
def process_exited(self) -> None: ...
|
||||
Reference in New Issue
Block a user