20 lines
428 B
Python
Raw Normal View History

2024-12-31 14:26:13 +00:00
def is_http(header_bytes: bytes) -> bool:
"""
Returns True if the header is an HTTP request.
"""
def is_ssh(header_bytes: bytes) -> bool:
"""
Returns True if the header is an SSH request.
"""
def write(fd: int, header_bytes: bytes) -> int:
"""
Sends data chunked to the client.
"""
def read(fd: int, length: int) -> bytes:
"""
Read n bytes from the client. Will not block.
"""